summaryrefslogtreecommitdiffstats
path: root/Modules/FindosgIntrospection.cmake
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2009-01-19 18:33:36 (GMT)
committerPhilip Lowman <philip@yhbt.com>2009-01-19 18:33:36 (GMT)
commitd1640b11def5076223a87680adb6341b1dbd2c10 (patch)
tree558e9c82969d7aa589bd0cebbf2e11a45aa25358 /Modules/FindosgIntrospection.cmake
parentd69e68609c29c14b3a88e2539d12940c04afb32b (diff)
downloadCMake-d1640b11def5076223a87680adb6341b1dbd2c10.zip
CMake-d1640b11def5076223a87680adb6341b1dbd2c10.tar.gz
CMake-d1640b11def5076223a87680adb6341b1dbd2c10.tar.bz2
BUG: Fixed Issue #7331 Bugs in Findosg*.cmake. Also added OPENTHREADS_LIBRARIES.
Diffstat (limited to 'Modules/FindosgIntrospection.cmake')
-rw-r--r--Modules/FindosgIntrospection.cmake60
1 files changed, 14 insertions, 46 deletions
diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake
index cf7ffac..4fe64ab 100644
--- a/Modules/FindosgIntrospection.cmake
+++ b/Modules/FindosgIntrospection.cmake
@@ -9,11 +9,15 @@
# If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
#
-# Locate osgIntrospection
+# Locate osgINTROSPECTION
# This module defines
-# OSGINTROSPECTION_LIBRARY
-# OSGINTROSPECTION_FOUND, if false, do not try to link to osgIntrospection
-# OSGINTROSPECTION_INCLUDE_DIR, where to find the headers
+#
+# OSGINTROSPECTION_FOUND - Was osgIntrospection found?
+# OSGINTROSPECTION_INCLUDE_DIR - Where to find the headers
+# OSGINTROSPECTION_LIBRARIES - The libraries to link for osgIntrospection (use this)
+#
+# OSGINTROSPECTION_LIBRARY - The osgIntrospection library
+# OSGINTROSPECTION_LIBRARY_DEBUG - The osgIntrospection debug library
#
# $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR
@@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform>
# #include <osgIntrospection/Reflection>
-# Try the user's environment request before anything else.
-FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection
- HINTS
- $ENV{OSGINTROSPECTION_DIR}
- $ENV{OSG_DIR}
- $ENV{OSGDIR}
- PATH_SUFFIXES include
- PATHS
- ~/Library/Frameworks
- /Library/Frameworks
- /usr/local
- /usr
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
- [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
- [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
-)
-
-FIND_LIBRARY(OSGINTROSPECTION_LIBRARY
- NAMES osgIntrospection
- HINTS
- $ENV{OSGINTROSPECTION_DIR}
- $ENV{OSG_DIR}
- $ENV{OSGDIR}
- PATH_SUFFIXES lib64 lib
- PATHS
- ~/Library/Frameworks
- /Library/Frameworks
- /usr/local
- /usr
- /sw
- /opt/local
- /opt/csw
- /opt
-)
-
-SET(OSGINTROSPECTION_FOUND "NO")
-IF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)
- SET(OSGINTROSPECTION_FOUND "YES")
-ENDIF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)
+include(Findosg_functions)
+OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection)
+OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection)
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGINTROSPECTION DEFAULT_MSG
+ OSGINTROSPECTION_LIBRARY OSGINTROSPECTION_INCLUDE_DIR)