]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
CMake: added FindSalomeMED.cmake so taht PARAVIS can load MED in config mode
authorbruneton <bruneton>
Wed, 10 Jul 2013 08:50:23 +0000 (08:50 +0000)
committerbruneton <bruneton>
Wed, 10 Jul 2013 08:50:23 +0000 (08:50 +0000)
Fixed some configruation elements

CMakeLists.txt
adm_local/cmake_files/CMakeLists.txt
adm_local/cmake_files/FindSalomeMED.cmake [new file with mode: 0644]
adm_local/cmake_files/SalomeMEDConfig.cmake.in

index 8ead1e4d150e82630b67d74ea44958f94e3b79ae..3ff90e5f790a40d6e812690d4402275a9d7ee017 100644 (file)
@@ -270,8 +270,9 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
 # Create the configuration files:
 #   - in the build tree:
 
-#      Ensure the variables are always defined for the configure:
-
+#      Ensure the variables are always defined for the configure (even if empty):
+SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
+SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
 SET(MEDFILE_ROOT_DIR "${MEDFILE_ROOT_DIR}")
 SET(HDF5_ROOT_DIR "${HDF5_ROOT_DIR}")
 SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}")
@@ -292,7 +293,8 @@ CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.
     ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
     INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
     PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX 
-       MEDFILE_ROOT_DIR HDF5_ROOT_DIR OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR
+       KERNEL_ROOT_DIR GUI_ROOT_DIR MEDFILE_ROOT_DIR 
+       HDF5_ROOT_DIR OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR
        SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
        SPHINX_ROOT_DIR)
 
index 1a69921e06b6f2b55e8c9a71d72390482672c9ab..dff494ff0fa7e6bbd51b98bce582b7d602029ec1 100644 (file)
@@ -25,6 +25,7 @@ SET(admlocal_cmake_DATA
   FindSalomeParMetis.cmake
   FindScotch.cmake
   FindSalomeScotch.cmake
+  FindSalomeMED.cmake
   )
 
 INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL})
diff --git a/adm_local/cmake_files/FindSalomeMED.cmake b/adm_local/cmake_files/FindSalomeMED.cmake
new file mode 100644 (file)
index 0000000..b984405
--- /dev/null
@@ -0,0 +1,39 @@
+# 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
+#
+#
+# Author: Adrien Bruneton
+#
+
+# MED detection for Salome - this is typically called by dependent modules
+# (PARAVIS, etc ...)
+#
+# The detection is simpler than for other prerequisites.
+# See explanation in FindSalomeKERNEL.cmake.
+#
+
+IF(NOT SalomeMED_FIND_QUIETLY)
+  MESSAGE(STATUS "Looking for Salome MED ...")
+ENDIF()
+
+SET(CMAKE_PREFIX_PATH "${MED_ROOT_DIR}")
+SALOME_FIND_PACKAGE(SalomeMED SalomeMED CONFIG)
+
+IF(NOT SalomeMED_FIND_QUIETLY)
+  MESSAGE(STATUS "Found Salome MED: ${MED_ROOT_DIR}")
+ENDIF()
index 70ff7ff253b0e7f81d467ec02bb214c5d665b022..32a61f3233796a12bd3bae9d170001bb118213b6 100644 (file)
@@ -71,19 +71,12 @@ ENDIF(SALOME_BUILD_GUI)
 
 # For all prerequisites, load the corresponding targets if the package was used 
 # in CONFIG mode. This ensures dependent projects link correctly
-# without having to set LD_LIBRARY_PATH:
+# without having to set LD_LIBRARY_PATH.
+# Many of them will be automatically loaded from KERNEL or GUI:
 
 SET(_PREREQ)
 SET(_PREREQ_CONFIG_DIR)
 
-IF(NOT SALOME_MED_STANDALONE)
-  LIST(APPEND _PREREQ             OmniORB)
-  LIST(APPEND _PREREQ_CONFIG_DIR "@OmniORB_DIR@" )
-  IF(SALOME_BUILD_GUI)
-    LIST(APPEND _PREREQ             Qt4)
-    LIST(APPEND _PREREQ_CONFIG_DIR "Qt4_DIR@" )
-  ENDIF()
-ENDIF()
 IF(NOT SALOME_MED_MICROMED)
   LIST(APPEND _PREREQ             HDF5         MEDFile )
   LIST(APPEND _PREREQ_CONFIG_DIR "@HDF5_DIR@"  "@MEDFile_DIR@")