From 75ade39e91269609a03a8bd061c9aae7c1518404 Mon Sep 17 00:00:00 2001 From: Stefan Bienert <stefan.bienert@unibas.ch> Date: Fri, 13 Sep 2013 13:11:03 +0200 Subject: [PATCH] Fixed issue in FindPython: requested Python version was only tested to be bigger than requirement, not equal to --- cmake_support/FindPython.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake_support/FindPython.cmake b/cmake_support/FindPython.cmake index 702744428..e1ba2b788 100644 --- a/cmake_support/FindPython.cmake +++ b/cmake_support/FindPython.cmake @@ -96,7 +96,8 @@ macro(check_for_python_lib) _find_python("${PYTHON_ROOT}" "${PYTHON_VERSION}") else() foreach(_VERSION ${PYTHON_VERSIONS}) - if(${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) + if((${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) OR + (${PYTHON_MIN_VERSION} VERSION_EQUAL ${_VERSION})) _find_python("${PYTHON_ROOT}" "${_VERSION}") if(PYTHON_LIBRARIES) set(PYTHON_VERSION "${_VERSION}") @@ -116,7 +117,8 @@ macro(check_for_python_binary) _find_python_bin("${PYTHON_ROOT}" "${PYTHON_VERSION}") else() foreach(_VERSION ${PYTHON_VERSIONS}) - if(${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) + if((${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) OR + (${PYTHON_MIN_VERSION} VERSION_EQUAL ${_VERSION})) _find_python_bin("${PYTHON_ROOT}" "${_VERSION}") if(PYTHON_BINARY) set(PYTHON_VERSION "${_VERSION}") -- GitLab