2021-10-27 13:38:05 +08:00
|
|
|
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
|
|
|
|
index d5f801e..141ab44 100644
|
|
|
|
--- a/CMakeFilters.cmake
|
|
|
|
+++ b/CMakeFilters.cmake
|
2021-11-19 13:25:08 +08:00
|
|
|
@@ -124,6 +124,16 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
|
|
|
|
set (H5_HAVE_LIBSZ 1)
|
|
|
|
set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
|
|
|
|
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
|
|
|
|
+ elseif(1)
|
2021-10-27 13:38:05 +08:00
|
|
|
+ find_package(szip CONFIG REQUIRED)
|
2021-11-19 13:25:08 +08:00
|
|
|
+ set(SZIP_INCLUDE_DIRS "")
|
|
|
|
+ # SZIP_STATIC_LIBRARY will be used in linking, in cmake and in pkgconfig,
|
|
|
|
+ # but the actual linkage doesn't matter.
|
|
|
|
+ if (TARGET szip-shared)
|
|
|
|
+ set(SZIP_STATIC_LIBRARY szip-shared)
|
2021-10-27 13:38:05 +08:00
|
|
|
+ else()
|
2021-11-19 13:25:08 +08:00
|
|
|
+ set(SZIP_STATIC_LIBRARY szip-static)
|
2021-10-27 13:38:05 +08:00
|
|
|
+ endif()
|
2021-11-19 13:25:08 +08:00
|
|
|
else ()
|
|
|
|
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
|
|
|
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
|