diff options
author | Philip Lowman <philip@yhbt.com> | 2009-01-30 21:55:57 (GMT) |
---|---|---|
committer | Philip Lowman <philip@yhbt.com> | 2009-01-30 21:55:57 (GMT) |
commit | 4b45824294258d91ba9cc8d9bf9d0b9310dbf1fa (patch) | |
tree | 81e875097291444b24098f2295ad499f08d483cc /Modules/FindOpenThreads.cmake | |
parent | 1569f5d0e46e7f763326b8e0e9f6529e3a0247d6 (diff) | |
download | CMake-4b45824294258d91ba9cc8d9bf9d0b9310dbf1fa.zip CMake-4b45824294258d91ba9cc8d9bf9d0b9310dbf1fa.tar.gz CMake-4b45824294258d91ba9cc8d9bf9d0b9310dbf1fa.tar.bz2 |
ENH: Added OSG_ROOT as supported env var (it's in the wild already). Cleaned
up FindOpenThreads to support PATH_SUFFIXES. Removed superfluous WIN32 registry
checks which should have been $ENV{} checks.
Diffstat (limited to 'Modules/FindOpenThreads.cmake')
-rw-r--r-- | Modules/FindOpenThreads.cmake | 113 |
1 files changed, 41 insertions, 72 deletions
diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake index e57f750..3fe44b5 100644 --- a/Modules/FindOpenThreads.cmake +++ b/Modules/FindOpenThreads.cmake @@ -40,91 +40,61 @@ find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread HINTS - $ENV{OPENTHREADS_INCLUDE_DIR} - $ENV{OPENTHREADS_DIR}/include - $ENV{OPENTHREADS_DIR} - $ENV{OSG_INCLUDE_DIR} - $ENV{OSG_DIR}/include - $ENV{OSG_DIR} - $ENV{OSGDIR}/include - $ENV{OSGDIR} + # enough environment variables? + $ENV{OPENTHREADS_INCLUDE_DIR} + $ENV{OPENTHREADS_DIR} + $ENV{OSG_INCLUDE_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OpenThreads_ROOT} + $ENV{OSG_ROOT} PATHS - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include - /usr/include - /sw/include # Fink - /opt/local/include # DarwinPorts - /opt/csw/include # Blastwave - /opt/include - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/include - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + /usr/freeware + PATH_SUFFIXES include ) find_library(OPENTHREADS_LIBRARY NAMES OpenThreads OpenThreadsWin32 HINTS - $ENV{OPENTHREADS_LIBRARY_DIR} - $ENV{OPENTHREADS_DIR}/lib64 - $ENV{OPENTHREADS_DIR}/lib - $ENV{OPENTHREADS_DIR} - $ENV{OSG_LIBRARY_DIR} - $ENV{OSG_DIR}/lib64 - $ENV{OSG_DIR}/lib - $ENV{OSG_DIR} - $ENV{OSGDIR}/lib64 - $ENV{OSGDIR}/lib - $ENV{OSGDIR} + $ENV{OPENTHREADS_LIBRARY_DIR} + $ENV{OPENTHREADS_DIR} + $ENV{OSG_LIBRARY_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OpenThreads_ROOT} + $ENV{OSG_ROOT} PATHS - ~/Library/Frameworks - /Library/Frameworks - /usr/local/lib64 - /usr/local/lib - /usr/lib64 - /usr/lib - /sw/lib64 - /sw/lib - /opt/local/lib64 - /opt/local/lib - /opt/csw/lib64 - /opt/csw/lib - /opt/lib64 - /opt/lib - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib + /sw + /opt/local + /opt/csw + /opt + /usr/freeware + PATH_SUFFIXES lib64 lib ) find_library(OPENTHREADS_LIBRARY_DEBUG NAMES OpenThreadsd OpenThreadsWin32d HINTS - $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR} - $ENV{OPENTHREADS_LIBRARY_DIR} - $ENV{OPENTHREADS_DIR}/lib64 - $ENV{OPENTHREADS_DIR}/lib - $ENV{OPENTHREADS_DIR} - $ENV{OSG_LIBRARY_DIR} - $ENV{OSG_DIR}/lib64 - $ENV{OSG_DIR}/lib - $ENV{OSG_DIR} - $ENV{OSGDIR}/lib64 - $ENV{OSGDIR}/lib - $ENV{OSGDIR} + $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR} + $ENV{OPENTHREADS_LIBRARY_DIR} + $ENV{OPENTHREADS_DIR} + $ENV{OSG_LIBRARY_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + $ENV{OpenThreads_ROOT} + $ENV{OSG_ROOT} PATHS - /usr/local/lib64 - /usr/local/lib - /usr/lib64 - /usr/lib - /sw/lib64 - /sw/lib - /opt/local/lib64 - /opt/local/lib - /opt/csw/lib64 - /opt/csw/lib - /opt/lib64 - /opt/lib - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib + /sw + /opt/local + /opt/csw + /opt + /usr/freeware + PATH_SUFFIXES lib64 lib ) if(OPENTHREADS_LIBRARY_DEBUG) @@ -132,7 +102,6 @@ if(OPENTHREADS_LIBRARY_DEBUG) optimized ${OPENTHREADS_LIBRARY} debug ${OPENTHREADS_LIBRARY_DEBUG}) else() - set(OPENTHREADS_LIBRARY_DEBUG ${OPENTHREADS_LIBRARY}) set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY}) endif() |