FindosgIntrospection.cmake 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 osgIntrospection
  13. # This module defines
  14. # OSGINTROSPECTION_LIBRARY
  15. # OSGINTROSPECTION_FOUND, if false, do not try to link to osgIntrospection
  16. # OSGINTROSPECTION_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 <osgIntrospection/Reflection>
  26. # Try the user's environment request before anything else.
  27. FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection
  28. PATHS
  29. $ENV{OSGINTROSPECTION_DIR}
  30. $ENV{OSG_DIR}
  31. $ENV{OSGDIR}
  32. NO_DEFAULT_PATH
  33. PATH_SUFFIXES include
  34. )
  35. FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection
  36. PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
  37. NO_DEFAULT_PATH
  38. PATH_SUFFIXES include
  39. )
  40. FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection
  41. PATHS
  42. ~/Library/Frameworks
  43. /Library/Frameworks
  44. /usr/local
  45. /usr
  46. /sw # Fink
  47. /opt/local # DarwinPorts
  48. /opt/csw # Blastwave
  49. /opt
  50. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
  51. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
  52. PATH_SUFFIXES include
  53. )
  54. FIND_LIBRARY(OSGINTROSPECTION_LIBRARY
  55. NAMES osgIntrospection
  56. PATHS
  57. $ENV{OSGINTROSPECTION_DIR}
  58. $ENV{OSG_DIR}
  59. $ENV{OSGDIR}
  60. NO_DEFAULT_PATH
  61. PATH_SUFFIXES lib64 lib
  62. )
  63. FIND_LIBRARY(OSGINTROSPECTION_LIBRARY
  64. NAMES osgIntrospection
  65. PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
  66. NO_DEFAULT_PATH
  67. PATH_SUFFIXES lib64 lib
  68. )
  69. FIND_LIBRARY(OSGINTROSPECTION_LIBRARY
  70. NAMES osgIntrospection
  71. PATHS
  72. ~/Library/Frameworks
  73. /Library/Frameworks
  74. /usr/local
  75. /usr
  76. /sw
  77. /opt/local
  78. /opt/csw
  79. /opt
  80. PATH_SUFFIXES lib64 lib
  81. )
  82. SET(OSGINTROSPECTION_FOUND "NO")
  83. IF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)
  84. SET(OSGINTROSPECTION_FOUND "YES")
  85. ENDIF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)