summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenThreads.cmake
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2012-08-18 20:46:08 (GMT)
committerPhilip Lowman <philip@yhbt.com>2012-08-18 20:46:08 (GMT)
commit224b5dea785d20a9054a2b7fb9e737c106084879 (patch)
tree2155c7c8ac161ed6a234fcd35e3f686643cf85e9 /Modules/FindOpenThreads.cmake
parent186e9bdc22256039948338d91ab3be02893ab17a (diff)
downloadCMake-224b5dea785d20a9054a2b7fb9e737c106084879.zip
CMake-224b5dea785d20a9054a2b7fb9e737c106084879.tar.gz
CMake-224b5dea785d20a9054a2b7fb9e737c106084879.tar.bz2
FindOpenSceneGraph: CMake variable OSG_DIR influences detection now too
Diffstat (limited to 'Modules/FindOpenThreads.cmake')
-rw-r--r--Modules/FindOpenThreads.cmake12
1 files changed, 11 insertions, 1 deletions
diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake
index 4f6e920..7668107 100644
--- a/Modules/FindOpenThreads.cmake
+++ b/Modules/FindOpenThreads.cmake
@@ -15,10 +15,15 @@
# correspond to the ./configure --prefix=$OPENTHREADS_DIR
# used in building osg.
#
+# [CMake 2.8.10]:
+# The CMake variables OPENTHREADS_DIR or OSG_DIR can now be used as well to influence
+# detection, instead of needing to specify an environment variable.
+#
# Created by Eric Wing.
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
+# Copyright 2012 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -53,7 +58,6 @@
find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
HINTS
- # enough environment variables?
$ENV{OPENTHREADS_INCLUDE_DIR}
$ENV{OPENTHREADS_DIR}
$ENV{OSG_INCLUDE_DIR}
@@ -61,6 +65,8 @@ find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
$ENV{OSGDIR}
$ENV{OpenThreads_ROOT}
$ENV{OSG_ROOT}
+ ${OPENTHREADS_DIR}
+ ${OSG_DIR}
PATHS
/sw # Fink
/opt/local # DarwinPorts
@@ -81,6 +87,8 @@ find_library(OPENTHREADS_LIBRARY
$ENV{OSGDIR}
$ENV{OpenThreads_ROOT}
$ENV{OSG_ROOT}
+ ${OPENTHREADS_DIR}
+ ${OSG_DIR}
PATHS
/sw
/opt/local
@@ -101,6 +109,8 @@ find_library(OPENTHREADS_LIBRARY_DEBUG
$ENV{OSGDIR}
$ENV{OpenThreads_ROOT}
$ENV{OSG_ROOT}
+ ${OPENTHREADS_DIR}
+ ${OSG_DIR}
PATHS
/sw
/opt/local