diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-17 12:10:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-18 13:11:06 +0300 |
commit | 34ee9ab97c0cf629987f8f3f72b529ca7e73e027 (patch) | |
tree | 21849302630ba5275c7c41cf4d3eea70801ec06a /CMakeLists.txt | |
parent | f3b7e99c04bef3d4070cef3cae92ee7b1d3d11ef (diff) |
CMake: remove PYTHON_NUMPY_INCLUDE_DIRS as a cache variable on macOS/Windows.
It's in a fixed location on those platforms, and having it as a cache variable
just means things break when we upgrade to a new Python version.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fa1405994c3..389287c04a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -379,7 +379,9 @@ if(UNIX AND NOT APPLE) endif() option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) -if(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) +if(WIN32 OR APPLE) + # Windows and macOS have this bundled with Python libraries. +elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module") mark_as_advanced(PYTHON_NUMPY_PATH) set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module") @@ -1477,14 +1479,14 @@ if(WITH_PYTHON) ) endif() - if(WIN32) - # pass, we have this in an archive to extract + if(WIN32 OR APPLE) + # Windows and macOS have this bundled with Python libraries. elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND)) find_python_package(numpy) unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE) set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module") - mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) + mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) endif() endif() |