From: vsr Date: Thu, 3 Jun 2021 16:19:08 +0000 (+0300) Subject: bos #24363 [CEA 24049] SalomeFindHDF5 does not return HDF5_CXX_LIBRARY X-Git-Tag: V9_8_0a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba3eb7852c86d220d6449c26d48f599db0d50e7f;p=tools%2Fconfiguration.git bos #24363 [CEA 24049] SalomeFindHDF5 does not return HDF5_CXX_LIBRARY --- diff --git a/cmake/FindSalomeHDF5.cmake b/cmake/FindSalomeHDF5.cmake index 1a4b27e..8f5d51e 100644 --- a/cmake/FindSalomeHDF5.cmake +++ b/cmake/FindSalomeHDF5.cmake @@ -44,10 +44,28 @@ SET(HDF5_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS};${HDF5_INCLUDE_DIR}") # Same story with libraries - if in CONFIG mode, HDF5_LIBRARIES is not defined: IF(NOT DEFINED HDF5_LIBRARIES) IF(TARGET hdf5) - SET(HDF5_LIBRARIES hdf5) + SET(HDF5_C_LIBRARIES hdf5) ELSEIF(TARGET hdf5::hdf5-shared) - SET(HDF5_LIBRARIES hdf5::hdf5-shared) + SET(HDF5_C_LIBRARIES hdf5::hdf5-shared) ENDIF() + IF(TARGET hdf5_cpp) + SET(HDF5_CXX_LIBRARIES hdf5_cpp) + ELSEIF(TARGET hdf5::hdf5-shared) + SET(HDF5_CXX_LIBRARIES hdf5::hdf5_cpp-shared) + ENDIF() + IF(TARGET hdf5_hl) + SET(HDF5_C_HL_LIBRARIES hdf5_hl) + ELSEIF(TARGET hdf5::hdf5_hl-shared) + SET(HDF5_C_HL_LIBRARIES hdf5::hdf5_hl-shared) + ENDIF() + IF(TARGET hdf5_hl_cpp) + SET(HDF5_CXX_HL_LIBRARIES hdf5_hl_cpp) + ELSEIF(TARGET hdf5::hdf5_hl_cpp-shared) + SET(HDF5_CXX_HL_LIBRARIES hdf5::hdf5_hl_cpp-shared) + ENDIF() + # Note: now we only set HDF5_LIBRARIES to CXX libraries as it's enough for SALOME. + # In future, we probably must list all libraries from requested components. + SET(HDF5_LIBRARIES ${HDF5_CXX_LIBRARIES}) ENDIF() ##