From: bruneton Date: Fri, 19 Jul 2013 13:09:52 +0000 (+0000) Subject: CMake: bug fix in HDF5 detection. Making CONFIG mode and MODULE mode consistent: X-Git-Tag: begin_agr_portmanager_branch_131004~85 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5f1a438394484f5fa829a7912628a44190728cca;p=modules%2Fkernel.git CMake: bug fix in HDF5 detection. Making CONFIG mode and MODULE mode consistent: both give out variables HDF5_LIBRARIES and HDF5_INCLUDE_DIRS --- diff --git a/salome_adm/cmake_files/FindSalomeHDF5.cmake b/salome_adm/cmake_files/FindSalomeHDF5.cmake index b00b1b421..a65e40f9b 100644 --- a/salome_adm/cmake_files/FindSalomeHDF5.cmake +++ b/salome_adm/cmake_files/FindSalomeHDF5.cmake @@ -30,6 +30,13 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1) MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB) +# Stupidly enough, CONFIG mode and MODULE mode for HDF5 do not return the same thing ...! +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) +ENDIF() + ## ## 7. Specific to HDF5 only: ## Expose MPI configuration to the rest of the world