From: Cédric Aguerre Date: Fri, 4 Dec 2015 14:51:14 +0000 (+0100) Subject: Add MEDCoupling dependency X-Git-Tag: simple_cmake~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4dbcade530997e6b2a07c567778a4292ea801c93;p=modules%2Fparavis.git Add MEDCoupling dependency --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ea961ae9..3f257338 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,7 +156,9 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS) or SALOME_PARAVIS_BUILD_PLUGINS=OFF in PARAVIS module") ENDIF() FIND_PACKAGE(SalomeMEDFile) + FIND_PACKAGE(MEDCoupling) SALOME_LOG_OPTIONAL_PACKAGE(MEDFile SALOME_PARAVIS_BUILD_PLUGINS) + SALOME_LOG_OPTIONAL_PACKAGE(MEDCoupling SALOME_PARAVIS_BUILD_PLUGINS) ENDIF() ## @@ -307,6 +309,7 @@ SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}") SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}") SET(MED_ROOT_DIR "${MED_ROOT_DIR}") SET(MEDFILE_ROOT_DIR "${MEDFILE_ROOT_DIR}") +SET(MEDCOUPLING_ROOT_DIR "${MEDCOUPLING_ROOT_DIR}") SET(GEOM_ROOT_DIR "${GEOM_ROOT_DIR}") SET(SMESH_ROOT_DIR "${SMESH_ROOT_DIR}") @@ -319,7 +322,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX - KERNEL_ROOT_DIR GUI_ROOT_DIR MED_ROOT_DIR MEDFILE_ROOT_DIR GEOM_ROOT_DIR SMESH_ROOT_DIR) + KERNEL_ROOT_DIR GUI_ROOT_DIR MED_ROOT_DIR MEDFILE_ROOT_DIR MEDCOUPLING_ROOT_DIR GEOM_ROOT_DIR SMESH_ROOT_DIR) # - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?): # Get the relative path of the include directory so diff --git a/src/Plugins/CMakeLists.txt b/src/Plugins/CMakeLists.txt index 2a5d8349..325f7983 100755 --- a/src/Plugins/CMakeLists.txt +++ b/src/Plugins/CMakeLists.txt @@ -20,8 +20,8 @@ INCLUDE(${PARAVIEW_USE_FILE}) SET(_subdirs - MEDReader -# TableReader + MEDReader +# TableReader ElevationSurface ScaleVector EllipseBuilder @@ -29,12 +29,13 @@ SET(_subdirs ArrayRenamer JSONReader ) - + IF(NOT SALOME_LIGHT_ONLY) LIST(APPEND _subdirs - ParaMEDCorba + ParaMEDCorba ) -ENDIF() +ENDIF() + IF(SALOME_PARAVIS_USE_GEOM_SOURCE) LIST(APPEND _subdirs ParaGEOMCorba) ENDIF() diff --git a/src/Plugins/MEDReader/CMakeLists.txt b/src/Plugins/MEDReader/CMakeLists.txt index 7646f507..6b918c16 100644 --- a/src/Plugins/MEDReader/CMakeLists.txt +++ b/src/Plugins/MEDReader/CMakeLists.txt @@ -25,7 +25,7 @@ #setenv LD_LIBRARY_PATH ...MEDReader_INSTALL/lib/salome:${LD_LIBRARY_PATH} # Typical cmake command -# env MED_ROOT_DIR=... cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=PATH_TO/MEDReader_INSTALL ../MEDReader_SRC -DMEDFILE_ROOT_DIR=/where/is/med-3.0.7_install +# env MED_ROOT_DIR=... cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=PATH_TO/MEDReader_INSTALL ../MEDReader_SRC -DMEDFILE_ROOT_DIR=/where/is/med-3.0.7_install -DMEDCOUPLING_ROOT_DIR=/where/is/medcoupling_install PROJECT(MEDReader) CMAKE_MINIMUM_REQUIRED(VERSION 2.8) @@ -59,7 +59,7 @@ ELSE(MEDReader_BUILD_ParaView_Plugin) ENDIF(NOT VTK_FOUND) INCLUDE(${VTK_USE_FILE}) ENDIF(MEDReader_BUILD_ParaView_Plugin) - + # Standard CMake option for building libraries shared or static by default. OPTION(BUILD_SHARED_LIBS "Build with shared libraries." ${VTK_BUILD_SHARED_LIBS}) # @@ -81,8 +81,8 @@ FIND_PACKAGE(SalomeMEDFile REQUIRED) # Accumulate environment variables for PARAVIS module SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS} ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}) -SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) -SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib/paraview) +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) +SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib/paraview) # # process all vtk-modules defined in this plugin. This generates the necessary @@ -91,7 +91,7 @@ SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib SET(VTK_INSTALL_RUNTIME_DIR lib/salome) SET(VTK_INSTALL_LIBRARY_DIR lib/salome) SET(VTK_INSTALL_ARCHIVE_DIR lib/salome) -INCLUDE_DIRECTORIES(${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(${MEDFILE_INCLUDE_DIRS} ${MEDCOUPLING_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS}) PV_PROCESS_MODULES() # diff --git a/src/Plugins/MEDReader/IO/CMakeLists.txt b/src/Plugins/MEDReader/IO/CMakeLists.txt index 48865a67..42eace0b 100644 --- a/src/Plugins/MEDReader/IO/CMakeLists.txt +++ b/src/Plugins/MEDReader/IO/CMakeLists.txt @@ -18,6 +18,7 @@ # INCLUDE_DIRECTORIES( + ${MEDCOUPLING_INCLUDE_DIRS} ${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ${MED_ROOT_DIR}/include/salome @@ -40,13 +41,13 @@ ENDFOREACH(class) ADD_LIBRARY(MEDLoaderForPV SHARED MEDFileFieldRepresentationTree.cxx MEDTimeReq.cxx MEDUtilities.cxx vtkGenerateVectors.cxx) IF(HDF5_IS_PARALLEL) - TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MED_paramedloader} ${MEDFILE_C_LIBRARIES}) + TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MEDCoupling_paramedloader} ${MEDFILE_C_LIBRARIES}) ELSE(HDF5_IS_PARALLEL) - TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MED_medloader} ${MEDFILE_C_LIBRARIES}) + TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MEDCoupling_medloader} ${MEDFILE_C_LIBRARIES}) ENDIF(HDF5_IS_PARALLEL) VTK_MODULE_LIBRARY(vtkMEDReader ${MEDReader_SRCS}) -TARGET_LINK_LIBRARIES(vtkMEDReader vtkPVVTKExtensionsRendering vtkRenderingFreeType vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL vtkInteractionStyle vtkFiltersCore vtkFiltersGeneral MEDLoaderForPV ${MEDFILE_C_LIBRARIES}) +TARGET_LINK_LIBRARIES(vtkMEDReader vtkPVVTKExtensionsRendering vtkRenderingFreeType vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL vtkInteractionStyle vtkFiltersCore vtkFiltersGeneral MEDLoaderForPV ${MEDFILE_C_LIBRARIES}) INSTALL( TARGETS vtkMEDReader MEDLoaderForPV diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/CMakeLists.txt b/src/Plugins/MEDReader/IO/Testing/Cxx/CMakeLists.txt index 204e90cb..063a7018 100644 --- a/src/Plugins/MEDReader/IO/Testing/Cxx/CMakeLists.txt +++ b/src/Plugins/MEDReader/IO/Testing/Cxx/CMakeLists.txt @@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../..) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../..) -INCLUDE_DIRECTORIES(${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(${MEDCOUPLING_INCLUDE_DIRS} ${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${MED_ROOT_DIR}/include/salome) SET( TestMedReader_SRCS TestMedReader.cxx )