summaryrefslogtreecommitdiff
path: root/indra/cmake/Python.cmake
diff options
context:
space:
mode:
authorKyle McKay <scot@lindenlab.com>2008-07-26 18:21:31 +0000
committerKyle McKay <scot@lindenlab.com>2008-07-26 18:21:31 +0000
commit1bb86fb755b99fa58f607b4dcf47c1466664d5ff (patch)
treed66a4c405eaa4045254d90d604f679c155eed50d /indra/cmake/Python.cmake
parente79f766f572f6540db4d09d8ffdc61e6daff66d0 (diff)
CMake updates:
1. Initial compatibility with CMake 2.6 (verified on Mac OS X, other platforms may need more work) 2. Ability to more easily debug problems fetching prebuilt libraries (./develop.py configure -DDEBUG_PREBUILT=1) 3. Compatibility with Mac OS X MacPorts/Fink installations by trying to find and use system python executable first
Diffstat (limited to 'indra/cmake/Python.cmake')
-rw-r--r--indra/cmake/Python.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake
index 895b353dbd..e9505fb8c8 100644
--- a/indra/cmake/Python.cmake
+++ b/indra/cmake/Python.cmake
@@ -21,6 +21,23 @@ elseif (EXISTS /etc/debian_version)
if (PYTHON_EXECUTABLE)
set(PYTHONINTERP_FOUND ON)
endif (PYTHON_EXECUTABLE)
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ # On MAC OS X be sure to search standard locations first
+
+ string(REPLACE ":" ";" PATH_LIST "$ENV{PATH}")
+ find_program(PYTHON_EXECUTABLE
+ NAMES python python25 python24 python23
+ NO_DEFAULT_PATH # Avoid searching non-standard locations first
+ PATHS
+ /bin
+ /usr/bin
+ /usr/local/bin
+ ${PATH_LIST}
+ )
+
+ if (PYTHON_EXECUTABLE)
+ set(PYTHONINTERP_FOUND ON)
+ endif (PYTHON_EXECUTABLE)
else (WINDOWS)
include(FindPythonInterp)
endif (WINDOWS)