linamh/dev-util/cmake/files/cmake-FindPythonLibs.patch
2010-12-25 17:43:20 +00:00

14 lines
546 B
Diff

--- Modules/FindPythonLibs.cmake
+++ Modules/FindPythonLibs.cmake
@@ -14,7 +14,9 @@
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
-FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+EXECUTE_PROCESS(COMMAND python -c "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))"
+ OUTPUT_VARIABLE _PYTHON_VERSION)
+FOREACH(_CURRENT_VERSION ${_PYTHON_VERSION})
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
IF(WIN32)
FIND_LIBRARY(PYTHON_DEBUG_LIBRARY