Moved the set of include/osg/Version into Cmake
This commit is contained in:
parent
a3f141d4b5
commit
2191e6a48d
@ -31,7 +31,7 @@ PROJECT(OpenSceneGraph)
|
|||||||
SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
|
SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
|
||||||
SET(OPENSCENEGRAPH_MINOR_VERSION 9)
|
SET(OPENSCENEGRAPH_MINOR_VERSION 9)
|
||||||
SET(OPENSCENEGRAPH_PATCH_VERSION 6)
|
SET(OPENSCENEGRAPH_PATCH_VERSION 6)
|
||||||
SET(OPENSCENEGRAPH_SOVERSION 61)
|
SET(OPENSCENEGRAPH_SOVERSION 62)
|
||||||
|
|
||||||
# set to 0 when not a release candidate, non zero means that any generated
|
# set to 0 when not a release candidate, non zero means that any generated
|
||||||
# svn tags will be treated as release candidates of given number
|
# svn tags will be treated as release candidates of given number
|
||||||
@ -312,6 +312,11 @@ OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG compon
|
|||||||
SET(OPENSCENEGRAPH_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/osg/Config")
|
SET(OPENSCENEGRAPH_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/osg/Config")
|
||||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in"
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in"
|
||||||
"${OPENSCENEGRAPH_CONFIG_HEADER}")
|
"${OPENSCENEGRAPH_CONFIG_HEADER}")
|
||||||
|
|
||||||
|
SET(OPENSCENEGRAPH_VERSION_HEADER "${PROJECT_BINARY_DIR}/include/osg/Version")
|
||||||
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Version.in"
|
||||||
|
"${OPENSCENEGRAPH_VERSION_HEADER}")
|
||||||
|
|
||||||
# INSTALL_FILES(/include/osg/ FILES "${OPENSCENEGRAPH_CONFIG_HEADER}")
|
# INSTALL_FILES(/include/osg/ FILES "${OPENSCENEGRAPH_CONFIG_HEADER}")
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|
||||||
#define OPENSCENEGRAPH_MAJOR_VERSION 2
|
#define OPENSCENEGRAPH_MAJOR_VERSION 2
|
||||||
#define OPENSCENEGRAPH_MINOR_VERSION 9
|
#define OPENSCENEGRAPH_MINOR_VERSION 9
|
||||||
#define OPENSCENEGRAPH_PATCH_VERSION 6
|
#define OPENSCENEGRAPH_PATCH_VERSION 6
|
||||||
|
@ -37,6 +37,7 @@ SET(LIB_PUBLIC_HEADERS
|
|||||||
${HEADER_PATH}/BoundsChecking
|
${HEADER_PATH}/BoundsChecking
|
||||||
${HEADER_PATH}/buffered_value
|
${HEADER_PATH}/buffered_value
|
||||||
${HEADER_PATH}/BufferObject
|
${HEADER_PATH}/BufferObject
|
||||||
|
${HEADER_PATH}/Config
|
||||||
${HEADER_PATH}/Camera
|
${HEADER_PATH}/Camera
|
||||||
${HEADER_PATH}/CameraNode
|
${HEADER_PATH}/CameraNode
|
||||||
${HEADER_PATH}/CameraView
|
${HEADER_PATH}/CameraView
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008-2009 Robert Osfield
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
73
src/osg/Version.in
Normal file
73
src/osg/Version.in
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSG_VERSION
|
||||||
|
#define OSG_VERSION 1
|
||||||
|
|
||||||
|
#include <osg/Export>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
#define OPENSCENEGRAPH_MAJOR_VERSION @OPENSCENEGRAPH_MAJOR_VERSION@
|
||||||
|
#define OPENSCENEGRAPH_MINOR_VERSION @OPENSCENEGRAPH_MINOR_VERSION@
|
||||||
|
#define OPENSCENEGRAPH_PATCH_VERSION @OPENSCENEGRAPH_PATCH_VERSION@
|
||||||
|
#define OPENSCENEGRAPH_SOVERSION @OPENSCENEGRAPH_SOVERSION@
|
||||||
|
|
||||||
|
/* convinience macro that can be used to decide whether a feature is present or not i.e.
|
||||||
|
* #if OSG_MIN_VERSION_REQUIRED(2,9,5)
|
||||||
|
* your code here
|
||||||
|
* #endif
|
||||||
|
*/
|
||||||
|
#define OSG_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH))))
|
||||||
|
#define OSG_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION<MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION<MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION<PATCH))))
|
||||||
|
#define OSG_VERSION_LESS_OR_EQUAL(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION<MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION<MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION<=PATCH))))
|
||||||
|
#define OSG_VERSION_GREATER_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>PATCH))))
|
||||||
|
#define OSG_VERSION_GREATER_OR_EQUAL(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH))))
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* osgGetVersion() returns the library version number.
|
||||||
|
* Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgGetVersion.
|
||||||
|
*
|
||||||
|
* This C function can be also used to check for the existence of the OpenSceneGraph
|
||||||
|
* library using autoconf and its m4 macro AC_CHECK_LIB.
|
||||||
|
*
|
||||||
|
* Here is the code to add to your configure.in:
|
||||||
|
\verbatim
|
||||||
|
#
|
||||||
|
# Check for the OpenSceneGraph (OSG) library
|
||||||
|
#
|
||||||
|
AC_CHECK_LIB(osg, osgGetVersion, ,
|
||||||
|
[AC_MSG_ERROR(OpenSceneGraph library not found. See http://www.openscenegraph.org)],)
|
||||||
|
\endverbatim
|
||||||
|
*/
|
||||||
|
extern OSG_EXPORT const char* osgGetVersion();
|
||||||
|
|
||||||
|
/** The osgGetSOVersion() method returns the OpenSceneGraph soversion number. */
|
||||||
|
extern OSG_EXPORT const char* osgGetSOVersion();
|
||||||
|
|
||||||
|
/** The osgGetLibraryName() method returns the library name in human-friendly form. */
|
||||||
|
extern OSG_EXPORT const char* osgGetLibraryName();
|
||||||
|
|
||||||
|
// old defines for backwards compatibility.
|
||||||
|
#define OSG_VERSION_MAJOR OPENSCENEGRAPH_MAJOR_VERSION
|
||||||
|
#define OSG_VERSION_MINOR OPENSCENEGRAPH_MINOR_VERSION
|
||||||
|
#define OSG_VERSION_PATCH OPENSCENEGRAPH_PATCH_VERSION
|
||||||
|
|
||||||
|
#define OSG_VERSION_RELEASE OSG_VERSION_PATCH
|
||||||
|
#define OSG_VERSION_REVISION 0
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user