]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Use conditional build for the Insitu component. omu/insitu
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 12 Sep 2016 15:58:50 +0000 (17:58 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 12 Sep 2016 15:58:50 +0000 (17:58 +0200)
CMakeLists.txt
idl/CMakeLists.txt
src/Insitu/CMakeLists.txt
src/Insitu/VisualizationComponent/CMakeLists.txt
src/Insitu/VisualizationLibrary/CMakeLists.txt

index adc06fc3f8d6757863a401b7afd35cebf7ca5ee8..29ea4d473f77b2f5eb93bcdc505f6dc63d6a7490 100644 (file)
@@ -144,7 +144,7 @@ FIND_PACKAGE(SalomeParaView REQUIRED)
 ##
 ## 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)
@@ -153,6 +153,9 @@ IF(SALOME_PARAVIS_BUILD_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")
@@ -163,35 +166,6 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS)
        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
 ##
index 4f6a89e5bf9d78f031be6da3f9976bc1f3a4bcc2..544cd60bb443f83469a20c401b00bbad1df9bc2b 100644 (file)
@@ -1,28 +1,31 @@
+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
index 1bc1057f2e308ffe09aac0e6112ef05be8f9db59..bb8efca228211913bd7bc6da335412a397251630 100644 (file)
@@ -1,3 +1,4 @@
-ADD_SUBDIRECTORY(VisualizationComponent)
-ADD_SUBDIRECTORY(VisualizationLibrary)
-
+IF(SALOME_PARAVIS_BUILD_INSITU)
+  ADD_SUBDIRECTORY(VisualizationComponent)
+  ADD_SUBDIRECTORY(VisualizationLibrary)
+ENDIF(SALOME_PARAVIS_BUILD_INSITU)
index 2ccee2d6f43ad1335b97d4cba4d2732ecfad4169..0517d6853b9a0bbd47a58a4222de299d966cc18e 100644 (file)
@@ -6,19 +6,18 @@ INCLUDE_DIRECTORIES(
   ${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}
@@ -27,10 +26,8 @@ SET(_link_LIBRARIES
   ${KERNEL_SalomeContainer}
   SalomeIDLPARAVIS
   ${KERNEL_SalomeMPIContainer}
-  #${_userlib_visulib}
-  #${_userlib_MEDLoaderForPV}
-  ${PARAVIS_MEDLoaderForPV}
-  ${PARAVIS_visulib}
+  MEDLoaderForPV
+  visulib
   ${MED_SalomeIDLMED}
   ${MED_med}
   ${MED_medcouplingcorba}
@@ -60,8 +57,8 @@ SET(PARAVIS_SOURCES
 
 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})
index 5ff03098015eb8aa405ba2dab1b41a4fbcde3eab..880976cf190b7e326fadf565729b2a545627020d 100644 (file)
@@ -1,20 +1,22 @@
 
 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
@@ -33,10 +35,8 @@ ADD_LIBRARY(visulib ${_lib_SOURCES})
 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 )