diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-10-21 14:45:37 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-10-21 14:46:33 +0300 |
commit | a5917175d8c1a7cab83b401ae2f4affcd4ab8df4 (patch) | |
tree | 353010c4089a3a8bf29efa27b4d9e31d4a71d42a /CMakeLists.txt | |
parent | 417ce7ffc1bbb9da15e82b6b81537bc86831f21c (diff) |
Deps: Python, bundle zstandard package
This package allows Python scripts to handle compressed blend files (see
rB2ea66af742bc). This is for example needed by Blender Asset Tracer to
send files to a Flamenco render farm.
This change includes a new `WITH_PYTHON_INSTALL_ZSTANDARD` build-time
option, to control whether to actually install the package. For this the
already-existing approach for Requests was copied.
Reviewed By: LazyDodo, mont29, brecht
Differential Revision: https://developer.blender.org/D12777
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ac11b495948..94a5ff27491 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -398,6 +398,10 @@ if(WITH_PYTHON_INSTALL) set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module") mark_as_advanced(PYTHON_REQUESTS_PATH) endif() + + option(WITH_PYTHON_INSTALL_ZSTANDARD "Copy zstandard into the blender install folder" ON) + set(PYTHON_ZSTANDARD_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'zstandard' module") + mark_as_advanced(PYTHON_ZSTANDARD_PATH) endif() option(WITH_CPU_SIMD "Enable SIMD instruction if they're detected on the host machine" ON) @@ -1734,6 +1738,12 @@ if(WITH_PYTHON) elseif(WITH_PYTHON_INSTALL_REQUESTS) find_python_package(requests "") endif() + + if(WIN32 OR APPLE) + # pass, we have this in lib/python/site-packages + elseif(WITH_PYTHON_INSTALL_ZSTANDARD) + find_python_package(zstandard "") + endif() endif() # Select C++17 as the standard for C++ projects. @@ -2005,6 +2015,7 @@ if(FIRST_RUN) endif() info_cfg_option(WITH_PYTHON_INSTALL) info_cfg_option(WITH_PYTHON_INSTALL_NUMPY) + info_cfg_option(WITH_PYTHON_INSTALL_ZSTANDARD) info_cfg_option(WITH_PYTHON_MODULE) info_cfg_option(WITH_PYTHON_SAFETY) |