802ac5ba5a
Update libraries to match VFX platform 2024, and a few other upgrades to latest versions. boost 1.82.0 deflate 1.18 (new) ffi 3.4.4 freeglut (deleted) ispc 1.12.1 llvm 17.0.6 materialx 1.38.8 mesa 23.3.0 numpy 1.24.3 opencolorio 2.3.0 openexr 3.2.1 openimageio 2.5.6.0 opensubdiv 3.6.0 openvdb 11.0.0 osl 1.13.5.0 (now dynamic) python 3.11.6 sqlite 3.42.0 sse2neon 0d6e9b3dd4 usd 23.11 vulkan 1.3.270 xm2 2.12.3 This only updates the build scripts, the precompiled libraries for each platform will land over the coming weeks. Ref #113157 Co-authored-by: Ray Molenkamp <github@lazydodo.com> Co-authored-by: Campbell Barton <campbell@blender.org> Pull Request: https://projects.blender.org/blender/blender/pulls/116420
140 lines
5.6 KiB
Diff
140 lines
5.6 KiB
Diff
diff --git a/openexr_original/cmake/OpenEXRSetup.cmake b/openexr/cmake/OpenEXRSetup.cmake
|
|
index 425992d..fa80886 100644
|
|
--- a/openexr_original/cmake/OpenEXRSetup.cmake
|
|
+++ b/openexr/cmake/OpenEXRSetup.cmake
|
|
@@ -160,71 +160,79 @@ set(OPENEXR_DEFLATE_TAG "v1.18" CACHE STRING "Tag to use for libdeflate source r
|
|
if(NOT OPENEXR_FORCE_INTERNAL_DEFLATE)
|
|
#TODO: ^^ Release should not clone from main, this is a place holder
|
|
set(CMAKE_IGNORE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-src/config;${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-build/config")
|
|
- include(FindPkgConfig)
|
|
- pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate)
|
|
- set(CMAKE_IGNORE_PATH)
|
|
- if (deflate_FOUND)
|
|
- message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}")
|
|
+ find_package(libdeflate CONFIG)
|
|
+ if(libdeflate_FOUND)
|
|
+ message(STATUS "Using libdeflate from ${libdeflate_DIR}")
|
|
+ else()
|
|
+ include(FindPkgConfig)
|
|
+ pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate)
|
|
+ set(CMAKE_IGNORE_PATH)
|
|
+ if (deflate_FOUND)
|
|
+ message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}")
|
|
+ endif()
|
|
endif()
|
|
endif()
|
|
|
|
-if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND)
|
|
- if(OPENEXR_FORCE_INTERNAL_DEFLATE)
|
|
- message(STATUS "libdeflate forced internal, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})")
|
|
- else()
|
|
- message(STATUS "libdeflate was not found, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})")
|
|
- endif()
|
|
- include(FetchContent)
|
|
- FetchContent_Declare(Deflate
|
|
- GIT_REPOSITORY "${OPENEXR_DEFLATE_REPO}"
|
|
- GIT_TAG "${OPENEXR_DEFLATE_TAG}"
|
|
- GIT_SHALLOW ON
|
|
- )
|
|
+if(libdeflate_FOUND)
|
|
+ set(EXR_DEFLATE_LIB libdeflate::libdeflate_static)
|
|
+else()
|
|
+ if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND)
|
|
+ if(OPENEXR_FORCE_INTERNAL_DEFLATE)
|
|
+ message(STATUS "libdeflate forced internal, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})")
|
|
+ else()
|
|
+ message(STATUS "libdeflate was not found, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})")
|
|
+ endif()
|
|
+ include(FetchContent)
|
|
+ FetchContent_Declare(Deflate
|
|
+ GIT_REPOSITORY "${OPENEXR_DEFLATE_REPO}"
|
|
+ GIT_TAG "${OPENEXR_DEFLATE_TAG}"
|
|
+ GIT_SHALLOW ON
|
|
+ )
|
|
|
|
- FetchContent_GetProperties(Deflate)
|
|
- if(NOT Deflate_POPULATED)
|
|
- FetchContent_Populate(Deflate)
|
|
- endif()
|
|
+ FetchContent_GetProperties(Deflate)
|
|
+ if(NOT Deflate_POPULATED)
|
|
+ FetchContent_Populate(Deflate)
|
|
+ endif()
|
|
|
|
- # Rather than actually compile something, just embed the sources
|
|
- # into exrcore. This could in theory cause issues when compiling as
|
|
- # a static library into another application which also uses
|
|
- # libdeflate but we switch the export symbol to hidden which should
|
|
- # hide the symbols when linking...
|
|
- set(EXR_DEFLATE_SOURCES
|
|
- lib/arm/cpu_features.c
|
|
- lib/x86/cpu_features.c
|
|
- lib/utils.c
|
|
- lib/deflate_compress.c
|
|
- lib/deflate_decompress.c
|
|
- lib/adler32.c
|
|
- lib/zlib_compress.c
|
|
- lib/zlib_decompress.c)
|
|
- # don't need these
|
|
- # lib/crc32.c
|
|
- # lib/gzip_compress.c
|
|
- # lib/gzip_decompress.c
|
|
- file(READ ${deflate_SOURCE_DIR}/lib/lib_common.h DEFLATE_HIDE)
|
|
- string(REPLACE "visibility(\"default\")" "visibility(\"hidden\")" DEFLATE_HIDE "${DEFLATE_HIDE}")
|
|
- string(REPLACE "__declspec(dllexport)" "/**/" DEFLATE_HIDE "${DEFLATE_HIDE}")
|
|
- file(WRITE ${deflate_SOURCE_DIR}/lib/lib_common.h "${DEFLATE_HIDE}")
|
|
+ # Rather than actually compile something, just embed the sources
|
|
+ # into exrcore. This could in theory cause issues when compiling as
|
|
+ # a static library into another application which also uses
|
|
+ # libdeflate but we switch the export symbol to hidden which should
|
|
+ # hide the symbols when linking...
|
|
+ set(EXR_DEFLATE_SOURCES
|
|
+ lib/arm/cpu_features.c
|
|
+ lib/x86/cpu_features.c
|
|
+ lib/utils.c
|
|
+ lib/deflate_compress.c
|
|
+ lib/deflate_decompress.c
|
|
+ lib/adler32.c
|
|
+ lib/zlib_compress.c
|
|
+ lib/zlib_decompress.c)
|
|
+ # don't need these
|
|
+ # lib/crc32.c
|
|
+ # lib/gzip_compress.c
|
|
+ # lib/gzip_decompress.c
|
|
+ file(READ ${deflate_SOURCE_DIR}/lib/lib_common.h DEFLATE_HIDE)
|
|
+ string(REPLACE "visibility(\"default\")" "visibility(\"hidden\")" DEFLATE_HIDE "${DEFLATE_HIDE}")
|
|
+ string(REPLACE "__declspec(dllexport)" "/**/" DEFLATE_HIDE "${DEFLATE_HIDE}")
|
|
+ file(WRITE ${deflate_SOURCE_DIR}/lib/lib_common.h "${DEFLATE_HIDE}")
|
|
|
|
- # cmake makes fetch content name lowercase for the properties (to deflate)
|
|
- list(TRANSFORM EXR_DEFLATE_SOURCES PREPEND ${deflate_SOURCE_DIR}/)
|
|
- set(EXR_DEFLATE_INCLUDE_DIR ${deflate_SOURCE_DIR})
|
|
- set(EXR_DEFLATE_LIB)
|
|
-else()
|
|
- set(EXR_DEFLATE_INCLUDE_DIR)
|
|
- set(EXR_DEFLATE_LIB ${deflate_LIBRARIES})
|
|
- # set EXR_DEFATE_LDFLAGS for OpenEXR.pc.in for static build
|
|
- if (BUILD_SHARED_LIBS)
|
|
- set(EXR_DEFLATE_LDFLAGS "")
|
|
+ # cmake makes fetch content name lowercase for the properties (to deflate)
|
|
+ list(TRANSFORM EXR_DEFLATE_SOURCES PREPEND ${deflate_SOURCE_DIR}/)
|
|
+ set(EXR_DEFLATE_INCLUDE_DIR ${deflate_SOURCE_DIR})
|
|
+ set(EXR_DEFLATE_LIB)
|
|
else()
|
|
- set(EXR_DEFLATE_LDFLAGS "-l${deflate_LIBRARIES}")
|
|
+ set(EXR_DEFLATE_INCLUDE_DIR)
|
|
+ set(EXR_DEFLATE_LIB ${deflate_LIBRARIES})
|
|
+ # set EXR_DEFATE_LDFLAGS for OpenEXR.pc.in for static build
|
|
+ if (BUILD_SHARED_LIBS)
|
|
+ set(EXR_DEFLATE_LDFLAGS "")
|
|
+ else()
|
|
+ set(EXR_DEFLATE_LDFLAGS "-l${deflate_LIBRARIES}")
|
|
+ endif()
|
|
+ set(EXR_DEFLATE_SOURCES)
|
|
endif()
|
|
- set(EXR_DEFLATE_SOURCES)
|
|
endif()
|
|
-
|
|
#######################################
|
|
# Find or install Imath
|
|
#######################################
|