diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index adcec46..d4f73eb 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -29,8 +29,11 @@ CMAKE_FIND_FRAMEWORKS(Python) # Set up the versions we know about, in the order we will search. Always add # the user supplied additional versions to the front. +EXECUTE_PROCESS(COMMAND python -c "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))" + OUTPUT_VARIABLE _Python_VERSIONS) set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS} + ${_Python_VERSIONS} 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})