From 70d73fe5234042d58afdbdd350d246fca485640f Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 17 Aug 2018 14:53:13 +0300 Subject: [PATCH] Porting to CMake-3.7.1 & HDF-1.10.1 --- cmake/FindSalomeHDF5.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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() ## -- 2.39.2