Commit bf28ff1f authored by Brad King's avatar Brad King
Browse files

FindPythonLibs: Do not try to find the interpreter (#13794)

The parent commit taught FindPythonLibs to try to find PythonInterp
unconditionally.  Some projects may want the libraries of a specific
version even when the corresponding interpreter is not available.  Drop
the internal use of FindPythonInterp and just use the versions from it
if it happens to have been found by the project first.  That will allow
projects to get a consistent version when they want both but not
otherwise force them to find the interpreter.
parent 3816cd2d
...@@ -83,7 +83,6 @@ endif() ...@@ -83,7 +83,6 @@ endif()
# If FindPythonInterp has already found the major and minor version, # If FindPythonInterp has already found the major and minor version,
# insert that version between the user supplied versions and the stock # insert that version between the user supplied versions and the stock
# version list. # version list.
find_package(PythonInterp QUIET)
set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}) set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS})
if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR) if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR)
list(APPEND _Python_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) list(APPEND _Python_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment