diff options
author | Philip Lowman <philip@yhbt.com> | 2009-01-19 18:33:36 (GMT) |
---|---|---|
committer | Philip Lowman <philip@yhbt.com> | 2009-01-19 18:33:36 (GMT) |
commit | d1640b11def5076223a87680adb6341b1dbd2c10 (patch) | |
tree | 558e9c82969d7aa589bd0cebbf2e11a45aa25358 /Modules/FindosgFX.cmake | |
parent | d69e68609c29c14b3a88e2539d12940c04afb32b (diff) | |
download | CMake-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/FindosgFX.cmake')
-rw-r--r-- | Modules/FindosgFX.cmake | 58 |
1 files changed, 13 insertions, 45 deletions
diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake index 9b45c31..c5719c1 100644 --- a/Modules/FindosgFX.cmake +++ b/Modules/FindosgFX.cmake @@ -11,9 +11,13 @@ # # Locate osgFX # This module defines -# OSGFX_LIBRARY -# OSGFX_FOUND, if false, do not try to link to osgFX -# OSGFX_INCLUDE_DIR, where to find the headers +# +# OSGFX_FOUND - Was osgFX found? +# OSGFX_INCLUDE_DIR - Where to find the headers +# OSGFX_LIBRARIES - The libraries to link against for the osgFX (use this) +# +# OSGFX_LIBRARY - The osgFX library +# OSGFX_LIBRARY_DEBUG - The osgFX debug library # # $OSGDIR is an environment variable that would # correspond to the ./configure --prefix=$OSGDIR @@ -25,46 +29,10 @@ # #include <osg/PositionAttitudeTransform> # #include <osgFX/BumpMapping> -# Try the user's environment request before anything else. -FIND_PATH(OSGFX_INCLUDE_DIR osgFX/BumpMapping - HINTS - $ENV{OSGFX_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(OSGFX_LIBRARY - NAMES osgFX - HINTS - $ENV{OSGFX_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(OSGFX_FOUND "NO") -IF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR) - SET(OSGFX_FOUND "YES") -ENDIF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR) +include(Findosg_functions) +OSG_FIND_PATH (OSGFX osgFX/BumpMapping) +OSG_FIND_LIBRARY(OSGFX osgFX) +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGFX DEFAULT_MSG + OSGFX_LIBRARY OSGFX_INCLUDE_DIR) |