Findosg.cmake 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #.rst:
  2. # Findosg
  3. # -------
  4. #
  5. #
  6. #
  7. #
  8. #
  9. # NOTE: It is highly recommended that you use the new
  10. # FindOpenSceneGraph.cmake introduced in CMake 2.6.3 and not use this
  11. # Find module directly.
  12. #
  13. # This is part of the Findosg* suite used to find OpenSceneGraph
  14. # components. Each component is separate and you must opt in to each
  15. # module. You must also opt into OpenGL and OpenThreads (and Producer
  16. # if needed) as these modules won't do it for you. This is to allow you
  17. # control over your own system piece by piece in case you need to opt
  18. # out of certain components or change the Find behavior for a particular
  19. # module (perhaps because the default FindOpenGL.cmake module doesn't
  20. # work with your system as an example). If you want to use a more
  21. # convenient module that includes everything, use the
  22. # FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
  23. #
  24. # Locate osg This module defines
  25. #
  26. # OSG_FOUND - Was the Osg found? OSG_INCLUDE_DIR - Where to find the
  27. # headers OSG_LIBRARIES - The libraries to link against for the OSG (use
  28. # this)
  29. #
  30. # OSG_LIBRARY - The OSG library OSG_LIBRARY_DEBUG - The OSG debug
  31. # library
  32. #
  33. # $OSGDIR is an environment variable that would correspond to the
  34. # ./configure --prefix=$OSGDIR used in building osg.
  35. #
  36. # Created by Eric Wing.
  37. #=============================================================================
  38. # Copyright 2007-2009 Kitware, Inc.
  39. #
  40. # Distributed under the OSI-approved BSD License (the "License");
  41. # see accompanying file Copyright.txt for details.
  42. #
  43. # This software is distributed WITHOUT ANY WARRANTY; without even the
  44. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  45. # See the License for more information.
  46. #=============================================================================
  47. # (To distribute this file outside of CMake, substitute the full
  48. # License text for the above reference.)
  49. # Header files are presumed to be included like
  50. # #include <osg/PositionAttitudeTransform>
  51. # #include <osgUtil/SceneView>
  52. include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
  53. OSG_FIND_PATH (OSG osg/PositionAttitudeTransform)
  54. OSG_FIND_LIBRARY(OSG osg)
  55. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  56. FIND_PACKAGE_HANDLE_STANDARD_ARGS(osg DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR)