diff options
author | Ray Molenkamp <github@lazydodo.com> | 2019-06-06 05:51:00 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2019-06-06 05:51:00 +0300 |
commit | 7944a1aede0d1bb5fa1eb75c49a64c98cf4ba7c0 (patch) | |
tree | d368a141a819c204cadab8713a240011977e35f3 /source | |
parent | 9c76b2c3b685ffcfaa4d6f28eed14528ea06f745 (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/creator/CMakeLists.txt | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 6f5f413711f..41412af9aea 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -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 |