Skip to content

Commit

Permalink
fix modern HDF5 import (TriBITSPub/TriBITS#533)
Browse files Browse the repository at this point in the history
1. set the minimum version to the one I'm testing
   with
2. use HDF5_EXPORT_LIBRARIES since the targets
   defined are hard to predict
  • Loading branch information
ibaned committed Oct 24, 2022
1 parent 4f18ccc commit 2665240
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/tribits/common_tpls/FindTPLHDF5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

if (Netcdf_ALLOW_MODERN)

#set(minimum_modern_HDF5_version 4.7.4)
set(minimum_modern_HDF5_version 1.13.2)
print_var(Netcdf_ALLOW_MODERN)
message("-- Using find_package(HDF5 ${minimum_modern_HDF5_version} CONFIG) ...")
find_package(HDF5 ${minimum_modern_HDF5_version} CONFIG)
if (HDF5_FOUND)
message("-- Found HDF5_CONFIG=${HDF5_CONFIG}")
message("-- Generating Netcdf::all_libs and NetcdfConfig.cmake")
message("-- HDF5_EXPORT_LIBRARIES=${HDF5_EXPORT_LIBRARIES}")
tribits_extpkg_create_imported_all_libs_target_and_config_file(
HDF5
INNER_FIND_PACKAGE_NAME HDF5
IMPORTED_TARGETS_FOR_ALL_LIBS HDF5::HDF5)
IMPORTED_TARGETS_FOR_ALL_LIBS ${HDF5_EXPORT_LIBRARIES})
endif()

endif()
Expand Down

0 comments on commit 2665240

Please sign in to comment.