mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 16:00:25 +08:00
8d2a40f7c3
* [hdf5] update to 1.12.1 * version * Re-fix pkgconfig and szip, re-factory tool install, add feature utils * version * Fix debug lib name in pkgconfig files * Re-fix debug lib name in pkgconfig files, re-fix szip * Re-fix pkgconfig * version * Re-fix static szip, fix non-Windows installation * version * Apply suggestions * version * Apply suggestion * version
27 lines
1014 B
Diff
27 lines
1014 B
Diff
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
|
|
index d5f801e..141ab44 100644
|
|
--- a/CMakeFilters.cmake
|
|
+++ b/CMakeFilters.cmake
|
|
@@ -117,8 +117,20 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
|
|
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
|
|
endif ()
|
|
endif ()
|
|
+ else()
|
|
+ find_package(szip CONFIG REQUIRED)
|
|
endif ()
|
|
- if (SZIP_FOUND)
|
|
+ string(TOUPPER ${CMAKE_BUILD_TYPE} upper_build_type)
|
|
+ # SZIP_STATIC_LIBRARY will be used in cmake and pkgconfig, so it must be a absolute path
|
|
+ if (TARGET szip-shared)
|
|
+ if (WIN32)
|
|
+ get_target_property(SZIP_STATIC_LIBRARY szip-shared IMPORTED_IMPLIB_${upper_build_type})
|
|
+ else()
|
|
+ get_target_property(SZIP_STATIC_LIBRARY szip-shared IMPORTED_LOCATION_${upper_build_type})
|
|
+ endif()
|
|
+ elseif (TARGET szip-static)
|
|
+ get_target_property(SZIP_STATIC_LIBRARY szip-static IMPORTED_LOCATION_${upper_build_type})
|
|
+ elseif (SZIP_FOUND)
|
|
set (H5_HAVE_FILTER_SZIP 1)
|
|
set (H5_HAVE_SZLIB_H 1)
|
|
set (H5_HAVE_LIBSZ 1)
|