OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
OPTION(SALOME_PARAVIS_ALL_TEST "Add all tests for Salome PARAVIS module" OFF)
OPTION(SALOME_PARAVIS_BUILD_PLUGINS "Build PARAVIS plugins (MEDReader, etc ...)" ON)
+OPTION(SALOME_PARAVIS_BUILD_CORBA_PLUGINS "Build PARAVIS CORBA plugins (ParaMEDCorba -- this requires the SALOME MED module)" ON)
OPTION(SALOME_PARAVIS_USE_GEOM_SOURCE "Import a GEOMETRY object to PARAVIS via its Corba IOR" OFF)
OPTION(SALOME_PARAVIS_USE_SMESH_SOURCE "Import a MESH object to PARAVIS via its Corba IOR" OFF)
CMAKE_DEPENDENT_OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF
##
FIND_PACKAGE(SalomePython REQUIRED)
-FIND_PACKAGE(SalomeHDF5 REQUIRED)
-FIND_PACKAGE(SalomeSWIG REQUIRED)
IF(NOT SALOME_LIGHT_ONLY)
FIND_PACKAGE(SalomeOmniORB REQUIRED)
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
##
-## From GUI: part 2
-##
-FIND_PACKAGE(SalomeCAS REQUIRED) # [ABN] I wish I could avoid that ...
-
-##
-## From MED
+## From MEDCoupling / MEDFile / or MEDModule (if CORBA plugin required):
##
IF(SALOME_PARAVIS_BUILD_PLUGINS)
- SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "Path to the Salome MED module")
- IF(EXISTS ${MED_ROOT_DIR})
- LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local/cmake_files")
- FIND_PACKAGE(SalomeMED REQUIRED)
- ELSE()
- MESSAGE(FATAL_ERROR "We absolutely need the Salome MED module to build plugins, please define MED_ROOT_DIR")
- ENDIF()
- IF(SALOME_MED_STANDALONE OR SALOME_MED_MICROMED)
- MESSAGE(FATAL_ERROR "We absolutely need a Salome MED with KERNEL and with MED file dependancy,
- please set SALOME_MED_STANDALONE=OFF and SALOME_MED_MICROMED=OFF in MED module
- 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()
+ # If CORBA plugins required, take in MED module
+ IF(SALOME_PARAVIS_BUILD_CORBA_PLUGINS)
+ SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "Path to the SALOME MED module")
+ IF(EXISTS ${MED_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local/cmake_files")
+ FIND_PACKAGE(SalomeMED)
+ SALOME_LOG_OPTIONAL_PACKAGE(SalomeMED SALOME_PARAVIS_BUILD_CORBA_PLUGINS)
+ ENDIF()
+ ELSE(SALOME_PARAVIS_BUILD_CORBA_PLUGINS)
+ 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")
+ ENDIF()
+ FIND_PACKAGE(SalomeMEDCoupling) # will load MEDFile
+ SALOME_LOG_OPTIONAL_PACKAGE(MEDCoupling SALOME_PARAVIS_BUILD_PLUGINS)
+ ENDIF()
+ENDIF(SALOME_PARAVIS_BUILD_PLUGINS)
##
## From GEOM
##
-
IF(SALOME_PARAVIS_BUILD_PLUGINS AND SALOME_PARAVIS_USE_GEOM_SOURCE)
SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR} CACHE PATH "Path to the Salome GEOM")
IF(EXISTS ${GEOM_ROOT_DIR})
#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 -DMEDCOUPLING_ROOT_DIR=/where/is/medcoupling_install
+# 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 \
+# -DParaView_DIR=<PARAVIEW_INSTALL>/lib/cmake/paraview-4.3
PROJECT(MEDReader)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# Find dependant Library
#
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "KERNEL_ROOT_DIR")
-SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "MED_ROOT_DIR")
+SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "MEDCOUPLING_ROOT_DIR")
#LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local_without_kernel/cmake_files")
LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
-LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local/cmake_files")
+LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files")
INCLUDE(SalomeMacros)
INCLUDE(SalomeSetupPlatform)
-INCLUDE(SalomeMEDConfig)
FIND_PACKAGE(SalomePython REQUIRED)
FIND_PACKAGE(SalomeHDF5 REQUIRED)
-FIND_PACKAGE(SalomeMED REQUIRED)
+FIND_PACKAGE(SalomeMEDCoupling REQUIRED)
FIND_PACKAGE(SalomeMEDFile REQUIRED)
# Accumulate environment variables for PARAVIS module
ADD_DEFINITIONS("-DMEDREADER_USE_MPI")
ENDIF(HDF5_IS_PARALLEL)
-SET(MEDReader_CLASSES vtkMEDReader vtkExtractGroup vtkELNOMeshFilter vtkELNOSurfaceFilter vtkELNOFilter vtkExtractCellType vtkMEDQuadraturePointsGenerator)
+SET(MEDReader_CLASSES vtkMEDReader vtkExtractGroup vtkELNOMeshFilter vtkELNOSurfaceFilter vtkELNOFilter
+ vtkExtractCellType vtkMEDQuadraturePointsGenerator)
SET(MEDReader_SRCS)
SET(MEDReader_HDRS)
ADD_LIBRARY(MEDLoaderForPV SHARED MEDFileFieldRepresentationTree.cxx MEDTimeReq.cxx MEDUtilities.cxx vtkGenerateVectors.cxx)
IF(HDF5_IS_PARALLEL)
- TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${PARAMEDLOADER_LIBRARY} ${MEDFILE_C_LIBRARIES})
+ TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MEDCoupling_paramedloader} ${MEDFILE_C_LIBRARIES})
ELSE(HDF5_IS_PARALLEL)
- TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MEDLOADER_LIBRARY} ${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