osgEarth 2.1.1
|
#include <osgEarth/Export>
Go to the source code of this file.
Defines | |
#define | OSGEARTH_VERSION 1 |
#define | OSGEARTH_MAJOR_VERSION 2 |
#define | OSGEARTH_MINOR_VERSION 1 |
#define | OSGEARTH_PATCH_VERSION 1 |
#define | OSGEARTH_SOVERSION 0 |
#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)))) |
#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)))) |
#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)))) |
#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)))) |
#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)))) |
#define | OSGEARTH_VERSION_RELEASE OSGEARTH_VERSION_PATCH |
#define | OSGEARTH_VERSION_REVISION 0 |
Functions | |
OSGEARTH_EXPORT const char * | osgEarthGetVersion () |
OSGEARTH_EXPORT const char * | osgEarthGetSOVersion () |
OSGEARTH_EXPORT const char * | osgEarthGetLibraryName () |
#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)))) |
#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)))) |
#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)))) |
#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)))) |
#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)))) |
OSGEARTH_EXPORT const char* osgEarthGetLibraryName | ( | ) |
The osgGetLibraryName() method returns the library name in human-friendly form.
Definition at line 61 of file Version.cpp.
{ return "osgEarth Library"; }
OSGEARTH_EXPORT const char* osgEarthGetSOVersion | ( | ) |
The osgGetSOVersion() method returns the OSGEARTH shared object version number.
Definition at line 48 of file Version.cpp.
{ static char osgearth_soversion[32]; static int osgearth_soversion_init = 1; if (osgearth_soversion_init) { sprintf(osgearth_soversion,"%d",OSGEARTH_SOVERSION); osgearth_soversion_init = 0; } return osgearth_soversion; }
OSGEARTH_EXPORT const char* osgEarthGetVersion | ( | ) |
osgEarthGetVersion() returns the library version number. Numbering convention : OSGEARTH-1.0 will return 1.0 from osgEarthGetVersion.
This C function can be also used to check for the existence of the OSGEARTH library using autoconf and its m4 macro AC_CHECK_LIB.
Here is the code to add to your configure.in:
# # Check for the OSGEARTH (OSG) library # AC_CHECK_LIB(osg, osgEarthGetVersion, , [AC_MSG_ERROR(OSGEARTH library not found. See http://www.osgearth.org)],)
Definition at line 27 of file Version.cpp.
{ static char osgearth_version[256]; static int osgearth_version_init = 1; if (osgearth_version_init) { if (OSGEARTH_VERSION_REVISION==0) { sprintf(osgearth_version,"%d.%d.%d",OSGEARTH_MAJOR_VERSION,OSGEARTH_MINOR_VERSION,OSGEARTH_PATCH_VERSION); } else { sprintf(osgearth_version,"%d.%d.%d-%d",OSGEARTH_MAJOR_VERSION,OSGEARTH_MINOR_VERSION,OSGEARTH_PATCH_VERSION,OSGEARTH_VERSION_REVISION); } osgearth_version_init = 0; } return osgearth_version; }