diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d7cf4e325c..71186a58281 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,14 +349,16 @@ endif() option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) 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)) +elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE) OR WITH_MOD_FLUID) + option(WITH_PYTHON_NUMPY "Include NumPy in Blender (used by Audaspace and Mantaflow)" ON) + 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") + set(PYTHON_NUMPY_INCLUDE_DIRS "" CACHE PATH "Path to the include directory of the NumPy module") mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) endif() if(WITH_PYTHON_INSTALL) - option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON) + option(WITH_PYTHON_INSTALL_NUMPY "Copy system NumPy into the blender install folder" ON) if(UNIX AND NOT APPLE) option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON) @@ -1621,12 +1623,9 @@ if(WITH_PYTHON) 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)) + elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR WITH_PYTHON_NUMPY) 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) + find_python_package(numpy "core/include") endif() endif() |