Version 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
  2. *
  3. * This library is open source and may be redistributed and/or modified under
  4. * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
  5. * (at your option) any later version. The full license is in LICENSE file
  6. * included with this distribution, and on the openscenegraph.org website.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * OpenSceneGraph Public License for more details.
  12. */
  13. #ifndef OSG_VERSION
  14. #define OSG_VERSION 1
  15. #include <osg/Export>
  16. extern "C" {
  17. #define OPENSCENEGRAPH_MAJOR_VERSION 3
  18. #define OPENSCENEGRAPH_MINOR_VERSION 6
  19. #define OPENSCENEGRAPH_PATCH_VERSION 5
  20. #define OPENSCENEGRAPH_SOVERSION 161
  21. /* Convenience macro that can be used to decide whether a feature is present or not i.e.
  22. * #if OSG_MIN_VERSION_REQUIRED(2,9,5)
  23. * your code here
  24. * #endif
  25. */
  26. #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))))
  27. #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))))
  28. #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))))
  29. #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))))
  30. #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))))
  31. /**
  32. * osgGetVersion() returns the library version number.
  33. * Numbering convention : OpenSceneGraph-1.0 will return 1.0 from osgGetVersion.
  34. *
  35. * This C function can be also used to check for the existence of the OpenSceneGraph
  36. * library using autoconf and its m4 macro AC_CHECK_LIB.
  37. *
  38. * Here is the code to add to your configure.in:
  39. \verbatim
  40. #
  41. # Check for the OpenSceneGraph (OSG) library
  42. #
  43. AC_CHECK_LIB(osg, osgGetVersion, ,
  44. [AC_MSG_ERROR(OpenSceneGraph library not found. See http://www.openscenegraph.org)],)
  45. \endverbatim
  46. */
  47. extern OSG_EXPORT const char* osgGetVersion();
  48. /** The osgGetSOVersion() method returns the OpenSceneGraph shared object version number. */
  49. extern OSG_EXPORT const char* osgGetSOVersion();
  50. /** The osgGetLibraryName() method returns the library name in human-friendly form. */
  51. extern OSG_EXPORT const char* osgGetLibraryName();
  52. // old defines for backwards compatibility.
  53. #define OSG_VERSION_MAJOR OPENSCENEGRAPH_MAJOR_VERSION
  54. #define OSG_VERSION_MINOR OPENSCENEGRAPH_MINOR_VERSION
  55. #define OSG_VERSION_PATCH OPENSCENEGRAPH_PATCH_VERSION
  56. #define OSG_VERSION_RELEASE OSG_VERSION_PATCH
  57. #define OSG_VERSION_REVISION 0
  58. }
  59. #endif