2020-12-29 13:21:03 +08:00
|
|
|
diff --git a/CMake/HighFiveTargetDeps.cmake b/CMake/HighFiveTargetDeps.cmake
|
2021-06-10 06:26:03 +08:00
|
|
|
index 51bc7b2..f04bf4c 100644
|
2020-12-29 13:21:03 +08:00
|
|
|
--- a/CMake/HighFiveTargetDeps.cmake
|
|
|
|
+++ b/CMake/HighFiveTargetDeps.cmake
|
2021-06-10 06:26:03 +08:00
|
|
|
@@ -10,7 +10,13 @@ if(NOT TARGET libdeps)
|
|
|
|
if(NOT DEFINED HDF5_C_LIBRARIES)
|
|
|
|
set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE TRUE) # Consistency
|
|
|
|
set(HDF5_PREFER_PARALLEL ${HIGHFIVE_PARALLEL_HDF5})
|
|
|
|
- find_package(HDF5 REQUIRED)
|
|
|
|
+ find_package(hdf5 CONFIG REQUIRED)
|
|
|
|
+ set(HIGHFIVE_PARALLEL_HDF5 ${HDF5_ENABLE_PARALLEL})
|
|
|
|
+ if(TARGET hdf5::hdf5-shared)
|
|
|
|
+ set(HDF5_C_LIBRARIES hdf5::hdf5-shared)
|
|
|
|
+ elseif(TARGET hdf5::hdf5-static)
|
|
|
|
+ set(HDF5_C_LIBRARIES hdf5::hdf5-static)
|
|
|
|
+ endif()
|
|
|
|
endif()
|
2020-12-29 13:21:03 +08:00
|
|
|
|
2021-06-10 06:26:03 +08:00
|
|
|
if(HIGHFIVE_PARALLEL_HDF5 AND NOT HDF5_IS_PARALLEL)
|