FindosgManipulator.cmake 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # This is part of the Findosg* suite used to find OpenSceneGraph components.
  2. # Each component is separate and you must opt in to each module. You must
  3. # also opt into OpenGL and OpenThreads (and Producer if needed) as these
  4. # modules won't do it for you. This is to allow you control over your own
  5. # system piece by piece in case you need to opt out of certain components
  6. # or change the Find behavior for a particular module (perhaps because the
  7. # default FindOpenGL.cmake module doesn't work with your system as an
  8. # example).
  9. # If you want to use a more convenient module that includes everything,
  10. # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
  11. #
  12. # Locate osgManipulator
  13. # This module defines
  14. # OSG_LIBRARY
  15. # OSGMANIPULATOR_FOUND, if false, do not try to link to osgManipulator
  16. # OSGMANIPULATOR_INCLUDE_DIR, where to find the headers
  17. #
  18. # $OSGDIR is an environment variable that would
  19. # correspond to the ./configure --prefix=$OSGDIR
  20. # used in building osg.
  21. #
  22. # Created by Eric Wing.
  23. # Header files are presumed to be included like
  24. # #include <osg/PositionAttitudeTransform>
  25. # #include <osgManipulator/TrackballDragger>
  26. # Try the user's environment request before anything else.
  27. FIND_PATH(OSGMANIPULATOR_INCLUDE_DIR osgManipulator/TrackballDragger
  28. HINTS
  29. $ENV{OSGMANIPULATOR_DIR}
  30. $ENV{OSG_DIR}
  31. $ENV{OSGDIR}
  32. PATH_SUFFIXES include
  33. PATHS
  34. ~/Library/Frameworks
  35. /Library/Frameworks
  36. /usr/local
  37. /usr
  38. /sw # Fink
  39. /opt/local # DarwinPorts
  40. /opt/csw # Blastwave
  41. /opt
  42. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
  43. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
  44. )
  45. FIND_LIBRARY(OSGMANIPULATOR_LIBRARY
  46. NAMES osgManipulator
  47. HINTS
  48. $ENV{OSGMANIPULATOR_DIR}
  49. $ENV{OSG_DIR}
  50. $ENV{OSGDIR}
  51. PATH_SUFFIXES lib64 lib
  52. PATHS
  53. ~/Library/Frameworks
  54. /Library/Frameworks
  55. /usr/local
  56. /usr
  57. /sw
  58. /opt/local
  59. /opt/csw
  60. /opt
  61. )
  62. SET(OSGMANIPULATOR_FOUND "NO")
  63. IF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR)
  64. SET(OSGMANIPULATOR_FOUND "YES")
  65. ENDIF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR)