SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.")
+IF(HDF5_ROOT_DIR)
+ SET (HDF5_ROOT ${HDF5_ROOT_DIR})
+ENDIF()
+
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1)
MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB HDF5_DIR)
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)
- SET(HDF5_LIBRARIES hdf5)
+ IF(TARGET hdf5)
+ SET(HDF5_LIBRARIES hdf5)
+ ENDIF()
ENDIF()
##