2
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
3
* Copyright 2008-2010 Pelican Mapping
6
* osgEarth is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>
20
#ifndef OSGEARTH_VERSION
21
#define OSGEARTH_VERSION 1
23
#include <osgEarth/Export>
27
#define OSGEARTH_MAJOR_VERSION 2
28
#define OSGEARTH_MINOR_VERSION 0
29
#define OSGEARTH_PATCH_VERSION 0
30
#define OSGEARTH_SOVERSION 0
32
/* Convenience macro that can be used to decide whether a feature is present or not i.e.
33
* #if OSGEARTH_MIN_VERSION_REQUIRED(1,4,0)
37
#define OSGEARTH_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>=PATCH))))
38
#define OSGEARTH_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((OSGEARTH_MAJOR_VERSION<MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION<MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION<PATCH))))
39
#define OSGEARTH_VERSION_LESS_OR_EQUAL(MAJOR, MINOR, PATCH) ((OSGEARTH_MAJOR_VERSION<MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION<MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION<=PATCH))))
40
#define OSGEARTH_VERSION_GREATER_THAN(MAJOR, MINOR, PATCH) ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>PATCH))))
41
#define OSGEARTH_VERSION_GREATER_OR_EQUAL(MAJOR, MINOR, PATCH) ((OSGEARTH_MAJOR_VERSION>MAJOR) || (OSGEARTH_MAJOR_VERSION==MAJOR && (OSGEARTH_MINOR_VERSION>MINOR || (OSGEARTH_MINOR_VERSION==MINOR && OSGEARTH_PATCH_VERSION>=PATCH))))
45
* osgEarthGetVersion() returns the library version number.
46
* Numbering convention : OSGEARTH-1.0 will return 1.0 from osgEarthGetVersion.
48
* This C function can be also used to check for the existence of the OSGEARTH
49
* library using autoconf and its m4 macro AC_CHECK_LIB.
51
* Here is the code to add to your configure.in:
54
# Check for the OSGEARTH (OSG) library
56
AC_CHECK_LIB(osg, osgEarthGetVersion, ,
57
[AC_MSG_ERROR(OSGEARTH library not found. See http://www.osgearth.org)],)
60
extern OSGEARTH_EXPORT const char* osgEarthGetVersion();
62
/** The osgGetSOVersion() method returns the OSGEARTH shared object version number. */
63
extern OSGEARTH_EXPORT const char* osgEarthGetSOVersion();
65
/** The osgGetLibraryName() method returns the library name in human-friendly form. */
66
extern OSGEARTH_EXPORT const char* osgEarthGetLibraryName();
68
#define OSGEARTH_VERSION_RELEASE OSGEARTH_VERSION_PATCH
69
#define OSGEARTH_VERSION_REVISION 0