Cmake/Windows: Fix numpy being unpacked every build.
Every time you build cmake it unpacks numpy. It is seemingly very unhappy with OUTPUTS being directories rather than files. The creating of the directory is not needed, so that step was easy to resolve, next problem: was there was not a target that outputs the tarball so it too was deemed out of date. Losing that dependency as well, fixes the issue, while this is not great if we ever update the libs in svn, we are planning to drastically change the way we package python for windows so this is ok for now, but needs to be addressed with the next python update, T65547 is the tracking ticket for this. Tested with VS2015/2017/2019 with both msbuild and ninja generators
This commit is contained in:
parent
9c76b2c3b6
commit
7944a1aede
|
@ -737,22 +737,15 @@ elseif(WIN32)
|
|||
|
||||
if(WITH_PYTHON_INSTALL_NUMPY)
|
||||
set(PYTHON_NUMPY_VERSION 1.15)
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
|
||||
COMMAND ${CMAKE_COMMAND} -E
|
||||
make_directory ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy/__init__.py
|
||||
COMMAND ${CMAKE_COMMAND} -E
|
||||
tar xzvf "${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_${PYTHON_NUMPY_VERSION}$<$<CONFIG:Debug>:d>.tar.gz"
|
||||
DEPENDS
|
||||
${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_${PYTHON_NUMPY_VERSION}$<$<CONFIG:Debug>:d>.tar.gz
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
|
||||
)
|
||||
add_custom_target(
|
||||
python_numpy ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy/__init__.py
|
||||
)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
|
||||
|
|
Loading…
Reference in New Issue