[Bf-blender-cvs] [eea7e751f41] experimental-build: Another attempt at fixing numpy path issue.
Bastien Montagne
noreply at git.blender.org
Mon Dec 14 14:54:34 CET 2020
Commit: eea7e751f4111f836bb160be17baa5fc0cb8afaf
Author: Bastien Montagne
Date: Mon Dec 14 14:54:17 2020 +0100
Branches: experimental-build
https://developer.blender.org/rBeea7e751f4111f836bb160be17baa5fc0cb8afaf
Another attempt at fixing numpy path issue.
===================================================================
M build_files/cmake/macros.cmake
===================================================================
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 750c705ba10..9febeaa6889 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -1194,10 +1194,11 @@ function(find_python_package
message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'")
if(NOT "${relative_include_dir}" STREQUAL "")
+ set(_relative_include_dir "${package}/${relative_include_dir}")
unset(PYTHON_${_upper_package}_INCLUDE_DIRS CACHE)
find_path(PYTHON_${_upper_package}_INCLUDE_DIRS
NAMES
- "${package}/${relative_include_dir}"
+ "${_relative_include_dir}"
HINTS
"${PYTHON_LIBPATH}/"
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
@@ -1215,19 +1216,24 @@ function(find_python_package
if(NOT EXISTS "${PYTHON_${_upper_package}_INCLUDE_DIRS}")
message(WARNING
"Python package '${package}' include dir path could not be found in:\n"
- "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${package}/${relative_include_dir}', "
- "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${package}/${relative_include_dir}', "
- "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}/${relative_include_dir}', "
- "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}/${relative_include_dir}', "
- "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/vendor-packages/${package}/${relative_include_dir}', "
- "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/vendor-packages/${package}/${relative_include_dir}', "
+ "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${_relative_include_dir}', "
+ "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${_relative_include_dir}', "
+ "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${_relative_include_dir}', "
+ "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${_relative_include_dir}', "
+ "'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/vendor-packages/${_relative_include_dir}', "
+ "'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/vendor-packages/${_relative_include_dir}', "
"\n"
"The 'WITH_PYTHON_${_upper_package}' option will be disabled.\n"
"The build will be usable, only add-ons that depend on this package won't be functional."
)
set(WITH_PYTHON_${_upper_package} OFF PARENT_SCOPE)
else()
- message(STATUS "${package} include files found at '${PYTHON_${_upper_package}_PATH}'")
+ set(_temp "${PYTHON_${_upper_package}_INCLUDE_DIRS}/${package}/${relative_include_dir}")
+ unset(PYTHON_${_upper_package}_INCLUDE_DIRS CACHE)
+ set(PYTHON_${_upper_package}_INCLUDE_DIRS "${_temp}"
+ CACHE PATH "Path to the include directory of the ${package} module")
+
+ message(STATUS "${package} include files found at '${PYTHON_${_upper_package}_INCLUDE_DIRS}'")
endif()
endif()
endif()
More information about the Bf-blender-cvs
mailing list