CMake: Use statically built HDF5 again (given HDF5 is not usually part of OS stack)

This commit is contained in:
2025-11-01 10:52:09 +01:00
parent cfbe24f567
commit 40c2e2ad59
3 changed files with 16 additions and 6 deletions
+14 -1
View File
@@ -80,6 +80,13 @@ SET(PISTACHE_USE_CONTENT_ENCODING_DEFLATE ON)
SET(PISTACHE_BUILD_TESTS OFF)
SET(PISTACHE_USE_SSL ON)
SET(HDF5_ENABLE_SZIP_SUPPORT OFF)
SET(HDF5_ENABLE_SZIP_ENCODING OFF)
SET(HDF5_BUILD_EXAMPLES OFF)
SET(HDF5_BUILD_CPP_LIB OFF)
SET(HDF5_ENABLE_Z_LIB_SUPPORT ON)
SET(HDF5_EXTERNALLY_CONFIGURED 1)
FetchContent_Declare(
pistache_http
GIT_REPOSITORY https://github.com/fleon-psi/pistache
@@ -95,6 +102,12 @@ FetchContent_Declare(
EXCLUDE_FROM_ALL
)
FetchContent_Declare(hdf5
GIT_REPOSITORY https://github.com/HDFGroup/hdf5/
GIT_TAG hdf5_1.14.6
GIT_SHALLOW 1
EXCLUDE_FROM_ALL)
SET(SLS_DETECTOR_GIT_TAG "8.0.2")
IF(SLS9)
SET(SLS_DETECTOR_GIT_TAG "9.2.0")
@@ -113,7 +126,7 @@ FetchContent_Declare(
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(pistache_http zstd sls_detector_package catch2)
FetchContent_MakeAvailable(pistache_http zstd sls_detector_package catch2 hdf5)
ADD_SUBDIRECTORY(jungfrau)
ADD_SUBDIRECTORY(compression)
+1 -1
View File
@@ -7,7 +7,7 @@ This is an UNSTABLE release.
* jfjoch_writer: Fix UTC timestamp being generated wrong (mix between milli- and microseconds)
* jfjoch_viewer: Show data collection time in dataset tooltip
* jfjoch_viewer: Allow to choose the calibrant (presets for LaB6 and silver behenate)
* Use external HDF5, libjpeg, and libtiff: simpler build stack, these are built and linked statically in automated Docker builds
* Use external libjpeg-turbo and libtiff: simpler build stack, these are built and linked statically in automated Docker builds
* Remove OpenBLAS dependency
## 1.0.0-rc.95
+1 -4
View File
@@ -1,8 +1,5 @@
SET(HDF5_USE_STATIC_LIBRARIES TRUE)
FIND_PACKAGE(HDF5 1.10 REQUIRED)
ADD_LIBRARY(JFJochHDF5Wrappers STATIC HDF5Objects.cpp HDF5Objects.h ../compression/bitshuffle/bshuf_h5filter.c)
TARGET_LINK_LIBRARIES(JFJochHDF5Wrappers Compression HDF5::HDF5 ${CMAKE_DL_LIBS})
TARGET_LINK_LIBRARIES(JFJochHDF5Wrappers Compression hdf5-static)
ADD_LIBRARY(JFJochWriter STATIC
HDF5DataFile.h HDF5DataFile.cpp