Skip to content
Snippets Groups Projects
Commit ee4b6e58 authored by AlQuemist's avatar AlQuemist
Browse files

FindCustomPython3: allow to find the Python platform in a non-standard directory [MacOS]

parent cceb9499
No related branches found
No related tags found
3 merge requests!2050rebase main on r21/v21.1,!2047<root>/CMakeLists.txt: add 'BornAgain_LIBRARIES' cached variable to store...,!1988Migrate to pyenv Python Platform; Fix MacOS package (Major change)
...@@ -21,8 +21,11 @@ function(find_custom_python3) ...@@ -21,8 +21,11 @@ function(find_custom_python3)
set(version_minor_min 8) # minimum Python version = 3.8 set(version_minor_min 8) # minimum Python version = 3.8
set(_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) if(APPLE)
set(CMAKE_FIND_FRAMEWORK NEVER) # on MacOS, this is needed to find the Python platform in a non-standard directory
set(__CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK})
set(CMAKE_FIND_FRAMEWORK NEVER)
endif(APPLE)
# if DEFAULT_PATH is set, the Python platform will be sought in # if DEFAULT_PATH is set, the Python platform will be sought in
# the CMake default paths. This is used for finding the _main_ # the CMake default paths. This is used for finding the _main_
...@@ -36,7 +39,9 @@ function(find_custom_python3) ...@@ -36,7 +39,9 @@ function(find_custom_python3)
PATHS "${__PATHS}" NO_DEFAULT_PATH) PATHS "${__PATHS}" NO_DEFAULT_PATH)
endif() endif()
set(CMAKE_FIND_FRAMEWORK ${_CMAKE_FIND_FRAMEWORK}) if(APPLE)
set(CMAKE_FIND_FRAMEWORK ${__CMAKE_FIND_FRAMEWORK})
endif(APPLE)
# store the exported parameters in the internal cache; # store the exported parameters in the internal cache;
# eg., with pytag 'py39', 'Python3_LIBRARY_DIRS_py39' will be exported, etc. # eg., with pytag 'py39', 'Python3_LIBRARY_DIRS_py39' will be exported, etc.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment