mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 20:59:12 +08:00
22 lines
778 B
Diff
22 lines
778 B
Diff
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
|
|
index c2b81dc..a86d2d5 100644
|
|
--- a/CMakeFilters.cmake
|
|
+++ b/CMakeFilters.cmake
|
|
@@ -81,6 +81,16 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
|
|
if (NOT SZIP_USE_EXTERNAL)
|
|
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
|
|
if (NOT SZIP_FOUND)
|
|
+ find_package (SZIP CONFIG)
|
|
+ if (SZIP_FOUND)
|
|
+ if (TARGET szip-shared)
|
|
+ set(SZIP_LIBRARIES szip-shared)
|
|
+ else (TARGET szip-shared)
|
|
+ set(SZIP_LIBRARIES szip-static)
|
|
+ endif (TARGET szip-shared)
|
|
+ endif (SZIP_FOUND)
|
|
+ endif (NOT SZIP_FOUND)
|
|
+ if (NOT SZIP_FOUND)
|
|
find_package (SZIP) # Legacy find
|
|
if (SZIP_FOUND)
|
|
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
|