Findosg.cmake 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. Findosg
  5. -------
  6. NOTE: It is highly recommended that you use the new
  7. FindOpenSceneGraph.cmake introduced in CMake 2.6.3 and not use this
  8. Find module directly.
  9. This is part of the Findosg* suite used to find OpenSceneGraph
  10. components. Each component is separate and you must opt in to each
  11. module. You must also opt into OpenGL and OpenThreads (and Producer
  12. if needed) as these modules won't do it for you. This is to allow you
  13. control over your own system piece by piece in case you need to opt
  14. out of certain components or change the Find behavior for a particular
  15. module (perhaps because the default FindOpenGL.cmake module doesn't
  16. work with your system as an example). If you want to use a more
  17. convenient module that includes everything, use the
  18. FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
  19. Locate osg This module defines
  20. OSG_FOUND - Was the Osg found? OSG_INCLUDE_DIR - Where to find the
  21. headers OSG_LIBRARIES - The libraries to link against for the OSG (use
  22. this)
  23. OSG_LIBRARY - The OSG library OSG_LIBRARY_DEBUG - The OSG debug
  24. library
  25. $OSGDIR is an environment variable that would correspond to the
  26. ./configure --prefix=$OSGDIR used in building osg.
  27. Created by Eric Wing.
  28. #]=======================================================================]
  29. # Header files are presumed to be included like
  30. # #include <osg/PositionAttitudeTransform>
  31. # #include <osgUtil/SceneView>
  32. include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
  33. OSG_FIND_PATH (OSG osg/PositionAttitudeTransform)
  34. OSG_FIND_LIBRARY(OSG osg)
  35. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  36. FIND_PACKAGE_HANDLE_STANDARD_ARGS(osg DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR)