Findosg.cmake 1.8 KB

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