deps_builder: zstd 1.5.0
Having zstd available is a requirement for landing D5799 Reviewed By: sybren Differential Revision: https://developer.blender.org/D11079
This commit is contained in:
parent
4e65b1ef6c
commit
4be166b6b5
Notes:
blender-bot
2023-02-14 09:03:55 +01:00
Referenced by issue #89771, Cloth disk cache is not read on library overrides when original linked data is already set to use 'Disk Cache'
|
@ -56,6 +56,7 @@ else()
|
|||
endif()
|
||||
|
||||
include(cmake/zlib.cmake)
|
||||
include(cmake/zstd.cmake)
|
||||
include(cmake/openal.cmake)
|
||||
include(cmake/png.cmake)
|
||||
include(cmake/jpeg.cmake)
|
||||
|
|
|
@ -92,3 +92,4 @@ download_source(ISPC)
|
|||
download_source(GMP)
|
||||
download_source(POTRACE)
|
||||
download_source(HARU)
|
||||
download_source(ZSTD)
|
||||
|
|
|
@ -192,6 +192,8 @@ harvest(potrace/include potrace/include "*.h")
|
|||
harvest(potrace/lib potrace/lib "*.a")
|
||||
harvest(haru/include haru/include "*.h")
|
||||
harvest(haru/lib haru/lib "*.a")
|
||||
harvest(zstd/include zstd/include "*.h")
|
||||
harvest(zstd/lib zstd/lib "*.a")
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
harvest(libglu/lib mesa/lib "*.so*")
|
||||
|
|
|
@ -500,5 +500,11 @@ set(HARU_HASH 4f916aa49c3069b3a10850013c507460)
|
|||
set(HARU_HASH_TYPE MD5)
|
||||
set(HARU_FILE libharu-${HARU_VERSION}.tar.gz)
|
||||
|
||||
set(ZSTD_VERSION 1.5.0)
|
||||
set(ZSTD_URI https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz)
|
||||
set(ZSTD_HASH 5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94)
|
||||
set(ZSTD_HASH_TYPE SHA256)
|
||||
set(ZSTD_FILE zstd-${ZSTD_VERSION}.tar.gz)
|
||||
|
||||
set(SSE2NEON_GIT https://github.com/DLTcollab/sse2neon.git)
|
||||
set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(ZSTD_EXTRA_ARGS
|
||||
-DZSTD_BUILD_PROGRAMS=OFF
|
||||
-DZSTD_BUILD_SHARED=OFF
|
||||
-DZSTD_BUILD_STATIC=ON
|
||||
-DZSTD_BUILD_TESTS=OFF
|
||||
-DZSTD_LEGACY_SUPPORT=OFF
|
||||
-DZSTD_LZ4_SUPPORT=OFF
|
||||
-DZSTD_LZMA_SUPPORT=OFF
|
||||
-DZSTD_MULTITHREAD_SUPPORT=ON
|
||||
-DZSTD_PROGRAMS_LINK_SHARED=OFF
|
||||
-DZSTD_USE_STATIC_RUNTIME=OFF
|
||||
-DZSTD_ZLIB_SUPPORT=OFF
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_zstd
|
||||
URL file://${PACKAGE_DIR}/${ZSTD_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${ZSTD_HASH_TYPE}=${ZSTD_HASH}
|
||||
PREFIX ${BUILD_DIR}/zstd
|
||||
SOURCE_SUBDIR build/cmake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zstd ${DEFAULT_CMAKE_FLAGS} ${ZSTD_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/zstd
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_zstd after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zstd/lib/zstd_static${LIBEXT} ${HARVEST_TARGET}/zstd/lib/zstd_static${LIBEXT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zstd/include/ ${HARVEST_TARGET}/zstd/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue