~ubuntu-branches/debian/sid/osgearth/sid

« back to all changes in this revision

Viewing changes to src/osgEarth/Version

  • Committer: Bazaar Package Importer
  • Author(s): Pirmin Kalberer
  • Date: 2011-07-14 22:13:36 UTC
  • Revision ID: james.westby@ubuntu.com-20110714221336-94igk9rskxveh794
Tags: upstream-2.0+dfsg
ImportĀ upstreamĀ versionĀ 2.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*-c++-*- */
 
2
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
 
3
* Copyright 2008-2010 Pelican Mapping
 
4
* http://osgearth.org
 
5
*
 
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.
 
10
*
 
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.
 
15
*
 
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/>
 
18
*/
 
19
 
 
20
#ifndef OSGEARTH_VERSION
 
21
#define OSGEARTH_VERSION 1
 
22
 
 
23
#include <osgEarth/Export>
 
24
 
 
25
extern "C" {
 
26
 
 
27
#define OSGEARTH_MAJOR_VERSION    2
 
28
#define OSGEARTH_MINOR_VERSION    0
 
29
#define OSGEARTH_PATCH_VERSION    0
 
30
#define OSGEARTH_SOVERSION        0
 
31
 
 
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)
 
34
 *    your code here
 
35
 * #endif
 
36
 */
 
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))))
 
42
 
 
43
 
 
44
/**
 
45
  * osgEarthGetVersion() returns the library version number.
 
46
  * Numbering convention : OSGEARTH-1.0 will return 1.0 from osgEarthGetVersion.
 
47
  *
 
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.
 
50
  *
 
51
  * Here is the code to add to your configure.in:
 
52
 \verbatim
 
53
 #
 
54
 # Check for the OSGEARTH (OSG) library
 
55
 #
 
56
 AC_CHECK_LIB(osg, osgEarthGetVersion, ,
 
57
    [AC_MSG_ERROR(OSGEARTH library not found. See http://www.osgearth.org)],)
 
58
 \endverbatim
 
59
*/
 
60
extern OSGEARTH_EXPORT const char* osgEarthGetVersion();
 
61
 
 
62
/** The osgGetSOVersion() method returns the OSGEARTH shared object version number. */
 
63
extern OSGEARTH_EXPORT const char* osgEarthGetSOVersion();
 
64
 
 
65
/** The osgGetLibraryName() method returns the library name in human-friendly form. */
 
66
extern OSGEARTH_EXPORT const char* osgEarthGetLibraryName();
 
67
 
 
68
#define OSGEARTH_VERSION_RELEASE OSGEARTH_VERSION_PATCH
 
69
#define OSGEARTH_VERSION_REVISION 0
 
70
}
 
71
 
 
72
#endif