Salome HOME
merge from master
[tools/sat_salome.git] / products / patches / med-4.0.0alpha3.patch
1 diff -Naur --exclude=CVS --exclude=.git med-4.0.0alpha3_SRC.orig/config/cmake_files/FindMedfileHDF5.cmake med-4.0.0alpha3_SRC.patched/config/cmake_files/FindMedfileHDF5.cmake
2 --- med-4.0.0alpha3_SRC.orig/config/cmake_files/FindMedfileHDF5.cmake   2018-10-18 17:54:13.943386900 +0300
3 +++ med-4.0.0alpha3_SRC.patched/config/cmake_files/FindMedfileHDF5.cmake        2018-10-18 17:15:02.000000000 +0300
4 @@ -132,7 +132,16 @@
5    # As of HDF5-1.8.11 the following is still not set in the exported CONFIG
6    # of the official hdf5-config.cmake. We add it ourselves:
7    IF(NOT DEFINED HDF5_LIBRARIES)
8 -    SET(HDF5_LIBRARIES "hdf5")
9 +    IF(NOT TARGET hdf5 AND NOT TARGET hdf5-static AND NOT TARGET hdf5-shared)
10 +      # Some HDF5 versions (e.g. 1.8.18) used hdf5::hdf5 etc
11 +      SET(_target_prefix "hdf5::")
12 +    ENDIF()
13 +    IF(MEDFILE_BUILD_SHARED_LIBS)
14 +      SET(_suffix "-shared")
15 +    ELSE()
16 +      SET(_suffix "-static")
17 +    ENDIF()
18 +    SET(HDF5_LIBRARIES "${_target_prefix}hdf5${_suffix}")
19    ENDIF()
20    
21    SET(HDF5_ROOT_DIR ${_tmp_ROOT_DIR})