From: abn Date: Fri, 11 Dec 2015 14:00:55 +0000 (+0100) Subject: Bug fix in the exported CMake configuration X-Git-Tag: V8_0_0a1~5^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dea40d46cf14c44593bdcca073525afa5fe24576;p=modules%2Fmed.git Bug fix in the exported CMake configuration --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d132ed960..51725d58f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ OPTION(SALOME_BUILD_DOC "Build MED doc." ON) SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool") IF(EXISTS ${MEDCOUPLING_ROOT_DIR}) LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files") - FIND_PACKAGE(SalomeMEDCoupling REQUIRED) + FIND_PACKAGE(SalomeMEDCoupling REQUIRED) # will reload HDF5, MEDFile, XDR, etc ... ELSE(EXISTS ${MEDCOUPLING_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need the MEDCoupling tool, please define MEDCOUPLING_ROOT_DIR !") ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR}) @@ -85,8 +85,6 @@ ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR}) # # Set list of prerequisites # ========================= -FIND_PACKAGE(SalomeHDF5 REQUIRED) -FIND_PACKAGE(SalomeMEDFile REQUIRED) # XDR stuff IF(NOT WIN32) FIND_PACKAGE(SalomeXDR REQUIRED) @@ -253,13 +251,13 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets} # 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(MEDCOUPLING_ROOT_DIR "${MEDCOUPLING_ROOT_DIR}") +SET(QT4_ROOT_DIR "${QT4_ROOT_DIR}") SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}") -SET(HDF5_ROOT_DIR "${HDF5_ROOT_DIR}") SET(OMNIORB_ROOT_DIR "${OMNIORB_ROOT_DIR}") SET(PTHREAD_ROOT_DIR "${PTHREAD_ROOT_DIR}") SET(SWIG_ROOT_DIR "${SWIG_ROOT_DIR}") +SET(PTHREAD_ROOT_DIR "${SWIG_ROOT_DIR}") SET(PYTHON_ROOT_DIR "${PYTHON_ROOT_DIR}") SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}") SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}") @@ -272,17 +270,16 @@ SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}") SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") # Build variables that will be expanded when configuring SalomeConfig.cmake: -SALOME_CONFIGURE_PREPARE(MEDCoupling XDR Qt4 CppUnit Graphviz Doxygen Sphinx MPI omniORB - PThread Python HDF5 MEDFile) +SALOME_CONFIGURE_PREPARE(MEDCoupling Qt4 MPI omniORB CppUnit Graphviz Doxygen Sphinx + PThread Python) CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake - INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}_LOCAL" + INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX - KERNEL_ROOT_DIR GUI_ROOT_DIR MEDFILE_ROOT_DIR MEDCOUPLING_ROOT_DIR MPI_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) + KERNEL_ROOT_DIR GUI_ROOT_DIR MEDCOUPLING_ROOT_DIR QT4_ROOT_DIR MPI_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) WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${${PROJECT_NAME_UC}_VERSION} diff --git a/SalomeMEDConfig.cmake.in b/SalomeMEDConfig.cmake.in index 34196b8f4..76ebd015f 100644 --- a/SalomeMEDConfig.cmake.in +++ b/SalomeMEDConfig.cmake.in @@ -30,7 +30,7 @@ # Load the dependencies for the libraries of @PROJECT_NAME@ # (contains definitions for IMPORTED targets). This is only # imported if we are not built as a subproject (in this case targets are already there) -IF(NOT TARGET medcoupling AND NOT @PROJECT_NAME@_BINARY_DIR) +IF(NOT TARGET MEDFactoryEngine AND NOT @PROJECT_NAME@_BINARY_DIR) INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake") ENDIF() @@ -59,9 +59,6 @@ SET(SALOME_MED_BUILD_GUI @SALOME_BUILD_GUI@) # Level 1 prerequisites: # Optional level 1 prerequisites: - -SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@") - SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@") LIST(APPEND MED_DEFINITIONS "@KERNEL_DEFINITIONS@") IF(SALOME_MED_BUILD_GUI)