# 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()
##