summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindOpenThreads.cmake113
-rw-r--r--Modules/Findosg_functions.cmake22
2 files changed, 47 insertions, 88 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()
diff --git a/Modules/Findosg_functions.cmake b/Modules/Findosg_functions.cmake
index 65ad03d..6991136 100644
--- a/Modules/Findosg_functions.cmake
+++ b/Modules/Findosg_functions.cmake
@@ -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)
#