FindPython: ensure new Xcode framework for Python3 is detected

This commit is contained in:
Marc Chevrier 2020-01-10 13:43:42 +01:00
parent dd7b741b81
commit fcde42751a

View File

@ -62,6 +62,9 @@ macro (_PYTHON_FIND_FRAMEWORKS)
${CMAKE_SYSTEM_FRAMEWORK_PATH})
list (REMOVE_DUPLICATES _pff_frameworks)
foreach (_pff_framework IN LISTS _pff_frameworks)
if (EXISTS ${_pff_framework}/Python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}.framework)
list (APPEND ${_PYTHON_PREFIX}_FRAMEWORKS ${_pff_framework}/Python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}.framework)
endif()
if (EXISTS ${_pff_framework}/Python.framework)
list (APPEND ${_PYTHON_PREFIX}_FRAMEWORKS ${_pff_framework}/Python.framework)
endif()