diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-10-06 15:52:05 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:21 -0300 |
commit | 8d819060e031499119e6bb0ee8af6c4059a019dd (patch) | |
tree | 682d7111c04fad545bd6093002cfaf89cf44dedd | |
parent | c05a81d41fad2a08a1af2557c70f96f7ede03029 (diff) |
Fix detection of Python2 on system where "python" means "python2".
-rw-r--r-- | cmake/Modules/FindPythonInterpWithDebug.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/Modules/FindPythonInterpWithDebug.cmake b/cmake/Modules/FindPythonInterpWithDebug.cmake index 58a1c3d1a..2b9cd0980 100644 --- a/cmake/Modules/FindPythonInterpWithDebug.cmake +++ b/cmake/Modules/FindPythonInterpWithDebug.cmake @@ -1,7 +1,10 @@ -INCLUDE(FindPythonInterp) -INCLUDE(FindPythonLibs) +find_program(PYTHON_EXECUTABLE NAMES python2.7 python2.6 python2.5) -find_package(PythonInterp REQUIRED) +if(NOT PYTHON_EXECUTABLE) + find_package(PythonInterp REQUIRED) +else() + set(PYTHONINTERP_FOUND 1) +endif() if(PYTHONINTERP_FOUND AND UNIX AND CMAKE_BUILD_TYPE STREQUAL "Debug") # This is for Debian |