Properly generate versioning #define-s during autogen

This commit is contained in:
Thibault Saunier 2014-03-15 10:34:17 +01:00 committed by Thibault Saunier
parent 9b050a54cd
commit 9ef7344a21
3 changed files with 44 additions and 4 deletions

View file

@ -35,6 +35,16 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
[AM_DEFAULT_VERBOSITY=1
AC_SUBST(AM_DEFAULT_VERBOSITY)])
dnl GES versioning, this is mostly informational
GES_VERSION_MAJOR=$PACKAGE_VERSION_MAJOR
GES_VERSION_MINOR=$PACKAGE_VERSION_MINOR
GES_VERSION_MICRO=$PACKAGE_VERSION_MICRO
GES_VERSION_NANO=$PACKAGE_VERSION_NANO
AC_SUBST(GES_VERSION_MAJOR)
AC_SUBST(GES_VERSION_MINOR)
AC_SUBST(GES_VERSION_MICRO)
AC_SUBST(GES_VERSION_NANO)
dnl our libraries and install dirs use major.minor as a version
GST_API_VERSION=$GST_EDITING_SERVICES_VERSION_MAJOR.$GST_EDITING_SERVICES_VERSION_MINOR
dnl we override it here if we need to for the release candidate of new series
@ -348,6 +358,7 @@ dnl po/Makefile.in
AC_CONFIG_FILES(
Makefile
ges/ges-version.h
common/Makefile
common/m4/Makefile
gst-editing-services.spec

32
ges/ges-version.h.in Normal file
View file

@ -0,0 +1,32 @@
/* GStreamer Editing Services
* Copyright (C) 2014 Thibault Saunier <tsaunier@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GES_VERSION_H__
#define __GES_VERSION_H__
G_BEGIN_DECLS
#define GES_VERSION_MAJOR (@GES_VERSION_MAJOR@)
#define GES_VERSION_MINOR (@GES_VERSION_MINOR@)
#define GES_VERSION_MICRO (@GES_VERSION_MICRO@)
#define GES_VERSION_NANO (@GES_VERSION_NANO@)
G_END_DECLS
#endif /* __GES_H__ */

View file

@ -78,13 +78,10 @@
#include <ges/ges-gerror.h>
#include <ges/ges-audio-track.h>
#include <ges/ges-video-track.h>
#include <ges/ges-version.h>
G_BEGIN_DECLS
#define GES_VERSION_MAJOR (1)
#define GES_VERSION_MINOR (0)
#define GES_VERSION_MICRO (0)
#define GES_VERSION_NANO (0)
gboolean ges_init (void);