From 1bb86fb755b99fa58f607b4dcf47c1466664d5ff Mon Sep 17 00:00:00 2001 From: Kyle McKay Date: Sat, 26 Jul 2008 18:21:31 +0000 Subject: 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 --- indra/cmake/Python.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/cmake/Python.cmake') 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 @@ -18,6 +18,23 @@ elseif (EXISTS /etc/debian_version) find_program(PYTHON_EXECUTABLE python2.5 python2.3 python PATHS /usr/bin) + 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) -- cgit v1.2.3