Findosg.cmake 2.2 KB

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