forked from AravisProject/aravis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: add ARAVIS_CHECK_VERSION macro
Fix AravisProject#24
- Loading branch information
Showing
7 changed files
with
108 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ arvenumtypes.h | |
arvconfig.h | ||
arvconfig.h.in | ||
arvfeatures.h | ||
arvversion.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ AM_CFLAGS = -Wall | |
|
||
lib_LTLIBRARIES = libaravis-@[email protected] | ||
|
||
BUILT_SOURCES = arvenumtypes.h arvenumtypes.c arvfeatures.h | ||
BUILT_SOURCES = arvenumtypes.h arvenumtypes.c arvfeatures.h arvversion.h | ||
|
||
EXTRA_DIST += arvenumtypes.h.template \ | ||
arvenumtypes.c.template | ||
|
@@ -195,7 +195,7 @@ libaravis_@ARAVIS_API_VERSION@_ladir = $(includedir)/aravis-@ARAVIS_API_VERSION@ | |
libaravis_@ARAVIS_API_VERSION@_la_HEADERS = $(ARAVIS_HDRS) $(ARAVIS_HDRS_NO_INTRO) | ||
libaravis_@ARAVIS_API_VERSION@_la_HEADERS += arvenumtypes.h | ||
|
||
nodist_libaravis_@ARAVIS_API_VERSION@_la_HEADERS = arvfeatures.h | ||
nodist_libaravis_@ARAVIS_API_VERSION@_la_HEADERS = arvfeatures.h arvversion.h | ||
|
||
arvenumtypes.h: arvenumtypes.h.template $(ARAVIS_HDRS) $(ARAVIS_HDRS_NO_INTRO) $(GLIB_MKENUMS) | ||
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template arvenumtypes.h.template $(libaravis_@ARAVIS_API_VERSION@_la_HEADERS)) > $@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* Aravis - Digital camera library | ||
* | ||
* Copyright © 2009-2016 Emmanuel Pacaud | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser 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 | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General | ||
* Public License along with this library; if not, write to the | ||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
* | ||
* Author: Emmanuel Pacaud <[email protected]> | ||
*/ | ||
|
||
#ifndef ARV_VERSION_H | ||
#define ARV_VERSION_H | ||
|
||
#include <arvtypes.h> | ||
|
||
G_BEGIN_DECLS | ||
|
||
/** | ||
* ARAVIS_MAJOR_VERSION: | ||
* | ||
* The major version of the Aravis library. | ||
* | ||
* Since: 0.6.0 | ||
*/ | ||
|
||
#define ARAVIS_MAJOR_VERSION @ARAVIS_MAJOR_VERSION@ | ||
|
||
/** | ||
* ARAVIS_MINOR_VERSION: | ||
* | ||
* The minor version of the Aravis library. | ||
* | ||
* Since: 0.6.0 | ||
*/ | ||
|
||
#define ARAVIS_MINOR_VERSION @ARAVIS_MINOR_VERSION@ | ||
|
||
/** | ||
* ARAVIS_MICRO_VERSION: | ||
* | ||
* The micor version of the Aravis library. | ||
* | ||
* Since: 0.6.0 | ||
*/ | ||
|
||
#define ARAVIS_MICRO_VERSION @ARAVIS_MICRO_VERSION@ | ||
|
||
/** | ||
* ARAVIS_CHECK_VERSION: | ||
* @major: the major version to check for | ||
* @minor: the minor version to check for | ||
* @micro: the micro version to check for | ||
* | ||
* Checks the version of the Aravis library that is being compiled | ||
* against. | ||
* | ||
* Returns: %TRUE if the version of the Aravis header files | ||
* is the same as or newer than the passed-in version. | ||
* | ||
* Since: 0.6.0 | ||
*/ | ||
|
||
#define ARAVIS_CHECK_VERSION(major,minor,micro) \ | ||
(ARAVIS_MAJOR_VERSION > (major) || \ | ||
(ARAVIS_MAJOR_VERSION == (major) && ARAVIS_MINOR_VERSION > (minor)) || \ | ||
(ARAVIS_MAJOR_VERSION == (major) && ARAVIS_MINOR_VERSION == (minor) && \ | ||
ARAVIS_MICRO_VERSION >= (micro))) | ||
|
||
G_END_DECLS | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters