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.
This commit is contained in:
parent
1569f5d0e4
commit
4b45824294
|
@ -40,25 +40,21 @@
|
|||
|
||||
find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
|
||||
HINTS
|
||||
# enough environment variables?
|
||||
$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}
|
||||
$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
|
||||
)
|
||||
|
||||
|
||||
|
@ -66,33 +62,19 @@ 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_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
|
||||
|
@ -100,31 +82,19 @@ find_library(OPENTHREADS_LIBRARY_DEBUG
|
|||
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_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()
|
||||
|
||||
|
|
|
@ -15,16 +15,14 @@ function(OSG_FIND_PATH module header)
|
|||
$ENV{${module_uc}_DIR}
|
||||
$ENV{OSG_DIR}
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}
|
||||
PATH_SUFFIXES include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/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]
|
||||
/usr/freeware
|
||||
)
|
||||
endfunction(OSG_FIND_PATH module header)
|
||||
|
||||
|
@ -41,17 +39,14 @@ function(OSG_FIND_LIBRARY module library)
|
|||
$ENV{${module_uc}_DIR}
|
||||
$ENV{OSG_DIR}
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
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;OSG_ROOT]
|
||||
/usr/freeware
|
||||
)
|
||||
|
||||
find_library(${module_uc}_LIBRARY_DEBUG
|
||||
|
@ -60,17 +55,14 @@ function(OSG_FIND_LIBRARY module library)
|
|||
$ENV{${module_uc}_DIR}
|
||||
$ENV{OSG_DIR}
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
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;OSG_ROOT]
|
||||
/usr/freeware
|
||||
)
|
||||
|
||||
if(NOT ${module_uc}_LIBRARY_DEBUG)
|
||||
|
@ -85,8 +77,6 @@ function(OSG_FIND_LIBRARY module library)
|
|||
PARENT_SCOPE
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
endfunction(OSG_FIND_LIBRARY module library)
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue