From David Callu, improved consistency of Version strings and add version support

for osgIntrospection and osgManipulator.
This commit is contained in:
Robert Osfield
2007-09-05 17:12:24 +00:00
parent 92b1e7d53f
commit b20d542317
23 changed files with 269 additions and 20 deletions

View File

@@ -28,7 +28,7 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph (OSG) library
# Check for the OpenSceneGraph (OSG) DB library
#
AC_CHECK_LIB(osg, osgDBGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph DB library not found. See http://www.openscenegraph.org)],)

46
include/osgFX/Version Normal file
View File

@@ -0,0 +1,46 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 OSGFX_VERSION
#define OSGFX_VERSION 1
#include <osgFX/Export>
extern "C" {
/**
* osgFXGetVersion() returns the library version number.
* Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgFXGetVersion.
*
* 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) FX library
#
AC_CHECK_LIB(osg, osgFXGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph FX library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGFX_EXPORT const char* osgFXGetVersion();
/**
* getLibraryName() returns the library name in human friendly form.
*/
extern OSGFX_EXPORT const char* osgFXGetLibraryName();
}
#endif

View File

@@ -29,10 +29,10 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph (OSG) utility library
# Check for the OpenSceneGraph (OSG) GA library
#
AC_CHECK_LIB(osg, osgGAGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph utility library not found. See http://www.openscenegraph.org)],)
[AC_MSG_ERROR(OpenSceneGraph GA library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGGA_EXPORT const char* osgGAGetVersion();

View File

@@ -0,0 +1,48 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 OSGINTROSPECTION_VERSION
#define OSGINTROSPECTION_VERSION 1
#include <osgIntrospection/Export>
extern "C" {
/**
* osgIntrospectionGetVersion() returns the library version number.
* Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgIntrospectionGetVersion.
*
* 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) Introspection library
#
AC_CHECK_LIB(osg, osgIntrospectionGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph Introspection library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGINTROSPECTION_EXPORT const char* osgIntrospectionGetVersion();
/**
* getLibraryName_osgIntrospection() returns the library name in human friendly form.
*/
extern OSGINTROSPECTION_EXPORT const char* osgIntrospectionGetLibraryName();
}
#endif

View File

@@ -0,0 +1,48 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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 OSGMANIPULATOR_VERSION
#define OSGMANIPULATOR_VERSION 1
#include <osgManipulator/Export>
extern "C" {
/**
* osgManipulatorGetVersion() returns the library version number.
* Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgManipulatorGetVersion.
*
* 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) Manipulator library
#
AC_CHECK_LIB(osg, osgManipulatorGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph Manipulator library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGMANIPULATOR_EXPORT const char* osgManipulatorGetVersion();
/**
* osgManipulatorGetLibraryName() returns the library name in human friendly form.
*/
extern OSGMANIPULATOR_EXPORT const char* osgManipulatorGetLibraryName();
}
#endif

View File

@@ -29,10 +29,10 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph Terrain library
# Check for the OpenSceneGraph Particle library
#
AC_CHECK_LIB(osg, osgParticleGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph Terrain library not found. See http://www.openscenegraph.org)],)
[AC_MSG_ERROR(OpenSceneGraph Particle library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
OSGPARTICLE_EXPORT const char* osgParticleGetVersion();

View File

@@ -28,10 +28,10 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph (OSG) library
# Check for the OpenSceneGraph (OSG) Shadow library
#
AC_CHECK_LIB(osg, osgShadowGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph library not found. See http://www.openscenegraph.org)],)
[AC_MSG_ERROR(OpenSceneGraph Shadow library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGSHADOW_EXPORT const char* osgShadowGetVersion();

View File

@@ -28,10 +28,10 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph-Sim library
# Check for the OpenSceneGraph (OSG) Sim library
#
AC_CHECK_LIB(osg, osgSimGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph library not found. See http://www.openscenegraph.org)],)
[AC_MSG_ERROR(OpenSceneGraph Sim library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGSIM_EXPORT const char* osgSimGetVersion();

View File

@@ -28,7 +28,7 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph Terrain library
# Check for the OpenSceneGraph (OSG) Terrain library
#
AC_CHECK_LIB(osg, osgTerrainGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph Terrain library not found. See http://www.openscenegraph.org)],)

View File

@@ -28,10 +28,10 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph (OSG) library
# Check for the OpenSceneGraph (OSG) Text library
#
AC_CHECK_LIB(osg, osgTextGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph library not found. See http://www.openscenegraph.org)],)
[AC_MSG_ERROR(OpenSceneGraph Text library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGTEXT_EXPORT const char* osgTextGetVersion();

View File

@@ -29,10 +29,10 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph (OSG) utility library
# Check for the OpenSceneGraph (OSG) Util library
#
AC_CHECK_LIB(osg, osgUtilGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph utility library not found. See http://www.openscenegraph.org)],)
[AC_MSG_ERROR(OpenSceneGraph Util library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGUTIL_EXPORT const char* osgUtilGetVersion();

View File

@@ -29,10 +29,10 @@ extern "C" {
* Here is the code to add to your configure.in:
\verbatim
#
# Check for the OpenSceneGraph (OSG) utility library
# Check for the OpenSceneGraph (OSG) Viewer library
#
AC_CHECK_LIB(osg, osgViewerGetVersion, ,
[AC_MSG_ERROR(OpenSceneGraph utility library not found. See http://www.openscenegraph.org)],)
[AC_MSG_ERROR(OpenSceneGraph Viewer library not found. See http://www.openscenegraph.org)],)
\endverbatim
*/
extern OSGVIEWER_EXPORT const char* osgViewerGetVersion();

View File

@@ -23,7 +23,7 @@ const char* osgDBGetVersion()
const char* osgDBGetLibraryName()
{
return "OpenSceneGraph DB (data base) Library";
return "OpenSceneGraph DB (Data Base) Library";
}
}

View File

@@ -19,6 +19,7 @@ SET(LIB_PUBLIC_HEADERS
${HEADER_PATH}/SpecularHighlights
${HEADER_PATH}/Technique
${HEADER_PATH}/Validator
${HEADER_PATH}/Version
)
# FIXME: For OS X, need flag for Framework or dylib
@@ -35,6 +36,7 @@ ADD_LIBRARY(${LIB_NAME}
SpecularHighlights.cpp
Technique.cpp
Validator.cpp
Version.cpp
)
LINK_INTERNAL(${LIB_NAME}

29
src/osgFX/Version.cpp Normal file
View File

@@ -0,0 +1,29 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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.
*/
#include <osgFX/Version>
#include <osg/Version>
extern "C" {
const char* osgFXGetVersion()
{
return osgGetVersion();
}
const char* osgFXGetLibraryName()
{
return "OpenSceneGraph FX (Special effects) Library";
}
}

View File

@@ -24,7 +24,7 @@ const char* osgGAGetVersion()
const char* osgGAGetLibraryName()
{
return "OpenSceneGraph Gui Adapter Library";
return "OpenSceneGraph GA (Gui Adapter) Library";
}
}

View File

@@ -35,6 +35,7 @@ SET(LIB_PUBLIC_HEADERS
${HEADER_PATH}/type_traits
${HEADER_PATH}/Utility
${HEADER_PATH}/Value
${HEADER_PATH}/Version
${HEADER_PATH}/variant_cast
)
@@ -52,6 +53,7 @@ ADD_LIBRARY(${LIB_NAME}
Type.cpp
Utility.cpp
Value.cpp
Version.cpp
)
LINK_INTERNAL(${LIB_NAME}

View File

@@ -0,0 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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.
*/
#include <osgIntrospection/Version>
#include <osg/Version>
extern "C" {
const char* osgIntrospectionGetVersion()
{
return osgGetVersion();
}
const char* osgIntrospectionGetLibraryName()
{
return "OpenSceneGraph Introspection Library";
}
}

View File

@@ -29,6 +29,7 @@ SET(LIB_PUBLIC_HEADERS
${HEADER_PATH}/Translate2DDragger
${HEADER_PATH}/TranslateAxisDragger
${HEADER_PATH}/TranslatePlaneDragger
${HEADER_PATH}/Version
)
# FIXME: For OS X, need flag for Framework or dylib
@@ -55,6 +56,7 @@ ADD_LIBRARY(${LIB_NAME}
Translate2DDragger.cpp
TranslateAxisDragger.cpp
TranslatePlaneDragger.cpp
Version.cpp
)
LINK_INTERNAL(${LIB_NAME}

View File

@@ -0,0 +1,30 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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.
*/
#include <osgManipulator/Version>
#include <osg/Version>
extern "C" {
const char* osgManipulatorGetVersion()
{
return osgGetVersion();
}
const char* osgManipulatorGetLibraryName()
{
return "OpenSceneGraph Manipulator Library";
}
}

View File

@@ -24,7 +24,7 @@ const char* osgSimGetVersion()
const char* osgSimGetLibraryName()
{
return "OpenSceneGraph Visual Simulation Library";
return "OpenSceneGraph Sim (Visual Simulation) Library";
}
}

View File

@@ -23,7 +23,7 @@ const char* osgUtilGetVersion()
const char* osgUtilGetLibraryName()
{
return "OpenSceneGraph Utility Library";
return "OpenSceneGraph Util (Utility) Library";
}
}

View File

@@ -1,3 +1,15 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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.
*/
#include <osgViewer/Version>
#include <osg/Version>