From c4b7e2c1ddbf62d694721c32639afc8df43d11d3 Mon Sep 17 00:00:00 2001 From: Thomas Junk Date: Wed, 12 Apr 2023 16:23:30 -0500 Subject: [PATCH] update HDF5 find_package and link recipe from Lynn --- CMakeLists.txt | 10 +--------- dunecore/DAQTriggerSim/FDHDDAQWriter/CMakeLists.txt | 2 +- dunecore/DuneObj/CMakeLists.txt | 2 +- dunecore/HDF5Utils/CMakeLists.txt | 2 +- dunecore/HDF5Utils/dunedaqhdf5utils2/CMakeLists.txt | 2 +- dunecore/RawDecoding/CMakeLists.txt | 2 +- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be68bac0..ff1b30e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,15 +98,7 @@ find_package(FFTW3 REQUIRED EXPORT) find_ups_product( sqlite ) find_ups_product( nlohmann_json ) find_ups_product( highfive ) - -string(TOUPPER ${CMAKE_BUILD_TYPE} BTYPE_UC ) -if( ${BTYPE_UC} MATCHES "DEBUG" ) - find_library( LIBHDF5 NAMES hdf5_debug PATHS ENV HDF5_LIB NO_DEFAULT_PATH) -else() - find_library( LIBHDF5 NAMES hdf5 PATHS ENV HDF5_LIB NO_DEFAULT_PATH) -endif() -include_directories(${HDF5_INCLUDE_DIRS}) - +find_package(HDF5 REQUIRED EXPORT) # Define an export set for tool support to enable simpler per-tool build # call. diff --git a/dunecore/DAQTriggerSim/FDHDDAQWriter/CMakeLists.txt b/dunecore/DAQTriggerSim/FDHDDAQWriter/CMakeLists.txt index fc236ab4..0915cf6b 100644 --- a/dunecore/DAQTriggerSim/FDHDDAQWriter/CMakeLists.txt +++ b/dunecore/DAQTriggerSim/FDHDDAQWriter/CMakeLists.txt @@ -11,7 +11,7 @@ art_make(MODULE_LIBRARIES messagefacility::MF_MessageLogger CETLIB ROOT_BASIC_LIB_LIST - LIBHDF5 + HDF5::HDF5 dunecore::ChannelMap_FDHDChannelMapService_service BASENAME_ONLY ) diff --git a/dunecore/DuneObj/CMakeLists.txt b/dunecore/DuneObj/CMakeLists.txt index dc7c7985..eccd127f 100644 --- a/dunecore/DuneObj/CMakeLists.txt +++ b/dunecore/DuneObj/CMakeLists.txt @@ -13,7 +13,7 @@ art_make( cetlib::cetlib cetlib_except::cetlib_except ROOT_BASIC_LIB_LIST - LIBHDF5 + HDF5::HDF5 DICT_LIBRARIES # EXCLUDE OpDetDivRec.h OpDetDivRec.cc ) diff --git a/dunecore/HDF5Utils/CMakeLists.txt b/dunecore/HDF5Utils/CMakeLists.txt index f94e08a9..581ed39a 100644 --- a/dunecore/HDF5Utils/CMakeLists.txt +++ b/dunecore/HDF5Utils/CMakeLists.txt @@ -9,7 +9,7 @@ art_make_library(LIBRARY_NAME HDF5Utils art::Framework_Core art::Framework_Principal art::Framework_Services_Registry - LIBHDF5 + HDF5::HDF5 pthread z ) diff --git a/dunecore/HDF5Utils/dunedaqhdf5utils2/CMakeLists.txt b/dunecore/HDF5Utils/dunedaqhdf5utils2/CMakeLists.txt index 047a846b..d48e00ce 100644 --- a/dunecore/HDF5Utils/dunedaqhdf5utils2/CMakeLists.txt +++ b/dunecore/HDF5Utils/dunedaqhdf5utils2/CMakeLists.txt @@ -4,7 +4,7 @@ art_make( cetlib::cetlib cetlib_except::cetlib_except messagefacility::MF_MessageLogger - LIBHDF5 + HDF5::HDF5 pthread z ) diff --git a/dunecore/RawDecoding/CMakeLists.txt b/dunecore/RawDecoding/CMakeLists.txt index 47e3b236..0cf16bed 100644 --- a/dunecore/RawDecoding/CMakeLists.txt +++ b/dunecore/RawDecoding/CMakeLists.txt @@ -16,7 +16,7 @@ cet_build_plugin(FDHDDataInterface art::tool art::Persistency_Provenance messagefacility::MF_MessageLogger dunecore::HDF5Utils - LIBHDF5 + HDF5::HDF5 ) install_headers()