cmake - also use find_package to find hdf5

This commit is contained in:
Andrej730
2025-08-19 12:12:03 +05:00
parent b971135ce4
commit 6bf39b3d6a
+10 -1
View File
@@ -675,7 +675,16 @@ if(HDF5_SUPPORT)
z dl
)
else()
message(FATAL_ERROR "HDF5_LIBRARIES is not provided.")
find_package(HDF5 CONFIG)
if(NOT HDF5_DIR)
message(
FATAL_ERROR
"HDF5_LIBRARY_DIR is not provided (current value: '${HDF5_LIBRARY_DIR}'). "
"Also could not find HDF5 package."
)
endif()
message(STATUS "Found HDF5 package: '${HDF5_DIR}'.")
set(HDF5_LIBRARIES hdf5_cpp-static)
endif()
endif()