From: ageay Date: Mon, 8 Jul 2013 13:51:30 +0000 (+0000) Subject: MEDFile detection X-Git-Tag: B4KillOfAutomake~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=00b06de2272065d43666c6d329abc875b0e48e14;p=modules%2Fmed.git MEDFile detection --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a4b0f7442..dd1b65d7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,7 +81,7 @@ ENDIF(NOT SALOME_MED_STANDALONE) IF(NOT SALOME_MED_MICROMED) FIND_PACKAGE(SalomeHDF5 REQUIRED) - FIND_PACKAGE(SalomeMedfile REQUIRED) + FIND_PACKAGE(SalomeMEDFile REQUIRED) ENDIF(NOT SALOME_MED_MICROMED) IF(SALOME_BUILD_GUI) @@ -121,7 +121,7 @@ IF(SALOME_MED_ENABLE_PYTHON) ENDIF(SALOME_MED_ENABLE_PYTHON) IF(NOT SALOME_MED_MICROMED) - FIND_PACKAGE(SalomeMedfile REQUIRED) + FIND_PACKAGE(SalomeMEDFile REQUIRED) ENDIF(NOT SALOME_MED_MICROMED) diff --git a/adm_local_without_kernel/cmake_files/FindMEDFile.cmake b/adm_local_without_kernel/cmake_files/FindMEDFile.cmake new file mode 100644 index 000000000..5ee40e16f --- /dev/null +++ b/adm_local_without_kernel/cmake_files/FindMEDFile.cmake @@ -0,0 +1,42 @@ +# Copyright (C) 2007-2013 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. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# ------ + +MESSAGE(STATUS "Check for medfile ...") + +# ------ + +SET(MEDFILE_ROOT_DIR $ENV{MEDFILE_ROOT_DIR} CACHE PATH "Path to the MEDFile.") +IF(MEDFILE_ROOT_DIR) + LIST(APPEND CMAKE_PREFIX_PATH "${CPPUNIT_ROOT_DIR}") +ENDIF(MEDFILE_ROOT_DIR) + +FIND_PATH(MEDFILE_INCLUDE_DIRS med.h) +#FIND_PROGRAM(MDUMP mdump) +FIND_LIBRARY(MEDFILE_C_LIBRARIES libmedC.so medC) +FIND_LIBRARY(MEDFILE_F_LIBRARIES libmed.so med) +IF(MEDFILE_F_LIBRARIES) + SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES} ${MEDFILE_F_LIBRARIES}) +ELSE(MEDFILE_F_LIBRARIES) + SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES}) +ENDIF(MEDFILE_F_LIBRARIES) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(MEDFile REQUIRED_VARS MEDFILE_INCLUDE_DIRS MEDFILE_LIBRARIES) diff --git a/adm_local_without_kernel/cmake_files/FindSalomeMEDFile.cmake b/adm_local_without_kernel/cmake_files/FindSalomeMEDFile.cmake new file mode 100644 index 000000000..f890f17a9 --- /dev/null +++ b/adm_local_without_kernel/cmake_files/FindSalomeMEDFile.cmake @@ -0,0 +1,28 @@ +# Copyright (C) 2013 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. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author: Adrien Bruneton +# + +# Medfile detection dor Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# + +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_ROOT_DIR_EXP 0) +#MARK_AS_ADVANCED() diff --git a/adm_local_without_kernel/cmake_files/FindSalomeMedfile.cmake b/adm_local_without_kernel/cmake_files/FindSalomeMedfile.cmake deleted file mode 100644 index 10e45a635..000000000 --- a/adm_local_without_kernel/cmake_files/FindSalomeMedfile.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2013 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author: Adrien Bruneton -# - -# Medfile detection dor Salome -# -# !! Please read the generic detection procedure in SalomeMacros.cmake !! -# - -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(medfile MEDFILE_ROOT_DIR_EXP 0) -#MARK_AS_ADVANCED() \ No newline at end of file