##
## From MEDCoupling / MEDFile / or MEDModule (if CORBA plugin required):
##
-
+SET(SALOME_PARAVIS_BUILD_INSITU OFF)
IF(SALOME_PARAVIS_BUILD_PLUGINS)
# If CORBA plugins required, take in MED module
IF(SALOME_PARAVIS_BUILD_CORBA_PLUGINS)
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)
+ IF(SALOME_USE_MPI)
+ SET(SALOME_PARAVIS_BUILD_INSITU ON)
+ ENDIF(SALOME_USE_MPI)
ENDIF()
ELSE(SALOME_PARAVIS_BUILD_CORBA_PLUGINS)
SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool")
SALOME_LOG_OPTIONAL_PACKAGE(MEDCoupling SALOME_PARAVIS_BUILD_PLUGINS)
ENDIF()
ENDIF(SALOME_PARAVIS_BUILD_PLUGINS)
-
-#####################################
-# FIND MED
-#####################################
-SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "Path to MED module")
-IF(EXISTS ${MED_ROOT_DIR})
- LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local/cmake_files")
- FIND_PACKAGE(SalomeMED REQUIRED)
- ADD_DEFINITIONS(${MED_DEFINITIONS})
- INCLUDE_DIRECTORIES(${MED_INCLUDE_DIRS})
-ELSE(EXISTS ${MED_ROOT_DIR})
- MESSAGE(FATAL_ERROR "We absolutely need MED module, please define MED_ROOT_DIR")
-ENDIF(EXISTS ${MED_ROOT_DIR})
-#####################################
-
-#####################################
-# FIND MEDCOUPLING
-#####################################
-SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to MEDCOUPLING module")
-IF(EXISTS ${MEDCOUPLING_ROOT_DIR})
- LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files")
- FIND_PACKAGE(SalomeMEDCoupling REQUIRED)
- ADD_DEFINITIONS(${MEDCOUPLING_DEFINITIONS})
- INCLUDE_DIRECTORIES(${MEDCOUPLING_INCLUDE_DIRS})
-ELSE(EXISTS ${MEDCOUPLING_ROOT_DIR})
- MESSAGE(FATAL_ERROR "We absolutely need MEDCOUPLING module, please define MEDCOUPLING_ROOT_DIR")
-ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR})
-#####################################
-
##
## From GEOM
##
+IF(SALOME_PARAVIS_BUILD_INSITU)
+ INCLUDE(UseOmniORB) # Provided by KERNEL
-INCLUDE(UseOmniORB) # Provided by KERNEL
+ INCLUDE_DIRECTORIES(
+ ${OMNIORB_INCLUDE_DIR}
+ ${KERNEL_INCLUDE_DIRS}
+ ${PROJECT_BINARY_DIR}/idl
+ ${MED_INCLUDE_DIRS}
+ ${MEDCOUPLING_INCLUDE_DIRS}
+ )
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIR}
- ${KERNEL_INCLUDE_DIRS}
- ${PROJECT_BINARY_DIR}/idl
-)
+ SET(SalomeIDLPARAVIS_IDLSOURCES
+ PARAVIS.idl
+
+ )
-SET(SalomeIDLPARAVIS_IDLSOURCES
- PARAVIS.idl
-
-)
+ SET(_idl_include_dirs
+ ${KERNEL_ROOT_DIR}/idl/salome
+ ${MED_ROOT_DIR}/idl/salome
+
+ )
-SET(_idl_include_dirs
- ${KERNEL_ROOT_DIR}/idl/salome
- ${MED_ROOT_DIR}/idl/salome
-
-)
+ SET(_idl_link_flags
+ ${KERNEL_SalomeIDLKernel}
+ ${MED_SalomeIDLMED}
+
+ )
-SET(_idl_link_flags
- ${KERNEL_SalomeIDLKernel}
- ${MED_SalomeIDLMED}
-
-)
-
-OMNIORB_ADD_MODULE(SalomeIDLPARAVIS "${SalomeIDLPARAVIS_IDLSOURCES}" "${_idl_include_dirs}" "${_idl_link_flags}")
-INSTALL(TARGETS SalomeIDLPARAVIS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+ OMNIORB_ADD_MODULE(SalomeIDLPARAVIS "${SalomeIDLPARAVIS_IDLSOURCES}" "${_idl_include_dirs}" "${_idl_link_flags}")
+ INSTALL(TARGETS SalomeIDLPARAVIS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+ENDIF(SALOME_PARAVIS_BUILD_INSITU)
\ No newline at end of file
-ADD_SUBDIRECTORY(VisualizationComponent)
-ADD_SUBDIRECTORY(VisualizationLibrary)
-
+IF(SALOME_PARAVIS_BUILD_INSITU)
+ ADD_SUBDIRECTORY(VisualizationComponent)
+ ADD_SUBDIRECTORY(VisualizationLibrary)
+ENDIF(SALOME_PARAVIS_BUILD_INSITU)
${OMNIORB_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
${PROJECT_BINARY_DIR}/idl
+ ${MED_INCLUDE_DIRS}
+ ${MEDCOUPLING_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../VisualizationLibrary
)
# --- definitions ---
ADD_DEFINITIONS(
${OMNIORB_DEFINITIONS}
+ ${MED_DEFINITIONS}
+ ${MEDCOUPLING_DEFINITIONS}
)
-# find additional libraries
-#FIND_LIBRARY( _userlib_visulib visulib PATH /home/I35256/salome/install/V7_main_git/modules/install/PARAVIS_master/lib/salome)
-#FIND_LIBRARY( _userlib_MEDLoaderForPV MEDLoaderForPV PATH /home/I35256/salome/install/V7_main_git/modules/install/PARAVIS_master/lib/salome)
-
-
# libraries to link to
SET(_link_LIBRARIES
${OMNIORB_LIBRARIES}
${KERNEL_SalomeContainer}
SalomeIDLPARAVIS
${KERNEL_SalomeMPIContainer}
- #${_userlib_visulib}
- #${_userlib_MEDLoaderForPV}
- ${PARAVIS_MEDLoaderForPV}
- ${PARAVIS_visulib}
+ MEDLoaderForPV
+ visulib
${MED_SalomeIDLMED}
${MED_med}
${MED_medcouplingcorba}
ADD_LIBRARY(VisualizationComponentEngine ${PARAVIS_SOURCES})
TARGET_LINK_LIBRARIES(VisualizationComponentEngine ${_link_LIBRARIES} )
-#SET_TARGET_PROPERTIES( VisualizationComponentEngine PROPERTIES INSTALL_RPATH /home/I35256/salome/install/V7_main_git/modules/install/PARAVIS_master/lib/salome)
-INSTALL(TARGETS VisualizationComponentEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS VisualizationComponentEngine
+ DESTINATION ${SALOME_INSTALL_LIBS})
INSTALL(FILES ${PARAVIS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
SET(BUILD_SHARED_LIBS TRUE)
+
+ADD_DEFINITIONS(${MEDCOUPLING_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${MEDCOUPLING_INCLUDE_DIRS}
${MPI_INCLUDE_PATH}
${PARAVIS_INCLUDE_DIRS}
+ ${MEDCOUPLING_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../Plugins/MEDReader/IO/
)
-
SET(_link_LIBRARIES
${MEDCoupling_medcoupling}
${MEDCoupling_interpkernel}
${MPI_LIBRARIES}
${VTK_LIBRARIES}
${PARAVIS_MEDLoaderForPV}
- #${MEDLoaderForPV}
${MEDCoupling_medloader}
${MEDFILE_C_LIBRARIES}
vtkPVCatalyst
TARGET_LINK_LIBRARIES(visulib ${_link_LIBRARIES} )
INSTALL(TARGETS visulib
- RUNTIME DESTINATION lib/salome
- LIBRARY DESTINATION lib/salome
- ARCHIVE DESTINATION lib/salome
- )
+ EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_INSTALL_LIBS})
INSTALL(FILES ${_lib_HEADERS} DESTINATION include/salome )