X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=salome_adm%2Fcmake_files%2FFindSalomeHDF5.cmake;h=ac0ffe766bc0202d4496cb781745414279aca5e6;hb=0af54d3a4092980402cbc548f277fd724f98863f;hp=24be3f1f5fa9b494e3a3dad64bae89e12a521050;hpb=9f6690bfa11871fc7aeea03d6e37c6e4ed9b8f97;p=modules%2Fkernel.git diff --git a/salome_adm/cmake_files/FindSalomeHDF5.cmake b/salome_adm/cmake_files/FindSalomeHDF5.cmake index 24be3f1f5..ac0ffe766 100644 --- a/salome_adm/cmake_files/FindSalomeHDF5.cmake +++ b/salome_adm/cmake_files/FindSalomeHDF5.cmake @@ -1,9 +1,9 @@ -# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,9 +27,12 @@ # MPI root directory used for HDF5 compilation is exposed into MPI_ROOT_DIR_EXP # +SET(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to the HDF5.") + if(WIN32) set(PREV_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(CMAKE_FIND_LIBRARY_SUFFIXES dll${CMAKE_IMPORT_LIBRARY_SUFFIX}) + set(CMAKE_LIBRARY_PATH ${HDF5_ROOT_DIR}/dll) endif() SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1) @@ -42,8 +45,6 @@ IF(NOT DEFINED HDF5_LIBRARIES) SET(HDF5_LIBRARIES hdf5) ENDIF() -#SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS) - ## ## 7. Specific to HDF5 only: ## Expose MPI configuration to the rest of the world @@ -85,3 +86,8 @@ ENDIF() if(WIN32) set(CMAKE_FIND_LIBRARY_SUFFIXES ${PREV_CMAKE_FIND_LIBRARY_SUFFIXES}) endif() + +IF(HDF5_FOUND) + SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS) + SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${HDF5_LIBRARIES}) +ENDIF()