mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 14:09:02 +08:00
f23734d2b6
* [hdf5]Fix static builds when building dynamic builds. * [hdf5]Remove duplicate code, fix zlib library name. * [hdf5]Adapt links to different link types of szip. * [hdf5] Fix hdf5-config.cmake.in
25 lines
1.5 KiB
Diff
25 lines
1.5 KiB
Diff
diff --git a/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in b/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
|
|
index 3bd9e1d..7f6699c 100644
|
|
--- a/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
|
|
+++ b/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
|
|
@@ -108,11 +108,15 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
|
|
# project which has already built hdf5 as a subproject
|
|
#-----------------------------------------------------------------------------
|
|
if (NOT TARGET "@HDF5_PACKAGE@")
|
|
- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
|
|
- include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
|
|
+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND NOT TARGET "zlib")
|
|
+ find_package(ZLIB REQUIRED)
|
|
endif ()
|
|
- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip")
|
|
- include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
|
|
+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND NOT TARGET "szip")
|
|
+ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
|
|
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
|
|
+ else()
|
|
+ find_package(@SZIP_PACKAGE_NAME@ REQUIRED)
|
|
+ endif()
|
|
endif ()
|
|
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
|
|
endif ()
|