Merge topic 'different-python-header-libs-exe-0013794'
3816cd2d
FindPythonLibs: Find consistent Python interp, headers, libs (#13794)
This commit is contained in:
commit
c32ac3331f
|
@ -80,10 +80,15 @@ endif()
|
||||||
|
|
||||||
# Set up the versions we know about, in the order we will search. Always add
|
# Set up the versions we know about, in the order we will search. Always add
|
||||||
# the user supplied additional versions to the front.
|
# the user supplied additional versions to the front.
|
||||||
set(_Python_VERSIONS
|
# If FindPythonInterp has already found the major and minor version,
|
||||||
${Python_ADDITIONAL_VERSIONS}
|
# insert that version between the user supplied versions and the stock
|
||||||
${_PYTHON_FIND_OTHER_VERSIONS}
|
# version list.
|
||||||
)
|
find_package(PythonInterp QUIET)
|
||||||
|
set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS})
|
||||||
|
if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR)
|
||||||
|
list(APPEND _Python_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||||
|
endif()
|
||||||
|
list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS})
|
||||||
|
|
||||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||||
unset(_PYTHON1_VERSIONS)
|
unset(_PYTHON1_VERSIONS)
|
||||||
|
|
Loading…
Reference in New Issue