# 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}")
${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)
--- /dev/null
+# 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()
# 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@")