pineapple/externals/vcpkg/ports/hdf5/szip.patch

22 lines
883 B
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index d5f801e..141ab44 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -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)
+ find_package(szip CONFIG REQUIRED)
+ 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)
+ else()
+ set(SZIP_STATIC_LIBRARY szip-static)
+ endif()
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})