]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
Porting to CMake-3.7.1 & HDF-1.10.1 SHAPER_V9_1_0RC1
authorrnv <rnv@opencascade.com>
Fri, 17 Aug 2018 11:53:13 +0000 (14:53 +0300)
committerrnv <rnv@opencascade.com>
Fri, 17 Aug 2018 11:53:13 +0000 (14:53 +0300)
cmake/FindSalomeHDF5.cmake

index 22ed25b213fd2aa95866861f190bf801284ff63b..276ea8ed2287f150a18cc8a0c1e863b0089ca84a 100644 (file)
 
 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()
 
 ##