From: rnv Date: Fri, 17 Aug 2018 11:53:13 +0000 (+0300) Subject: Porting to CMake-3.7.1 & HDF-1.10.1 X-Git-Tag: SHAPER_V9_1_0RC1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=70d73fe5234042d58afdbdd350d246fca485640f;p=tools%2Fconfiguration.git Porting to CMake-3.7.1 & HDF-1.10.1 --- diff --git a/cmake/FindSalomeHDF5.cmake b/cmake/FindSalomeHDF5.cmake index 22ed25b..276ea8e 100644 --- a/cmake/FindSalomeHDF5.cmake +++ b/cmake/FindSalomeHDF5.cmake @@ -29,6 +29,10 @@ 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) @@ -36,7 +40,9 @@ 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() ##