# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
+INCLUDE(CMakeDependentOption)
PROJECT(SalomePARAVIS C CXX)
IF(WIN32)
OPTION(SALOME_BUILD_DOC "Generate SALOME GUI documentation" ON)
OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
OPTION(SALOME_PARAVIS_ALL_TEST "Add all tests for Salome PARAVIS module" OFF)
-OPTION(SALOME_PARAVIS_MINIMAL_CORBA "Build PARAVIS with a minimal CORBA interface" OFF)
OPTION(SALOME_PARAVIS_BUILD_PLUGINS "Build PARAVIS plugins (MEDReader, etc ...)" ON)
+CMAKE_DEPENDENT_OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF
+ "NOT SALOME_KERNEL_LIGHT_ONLY" ON)
+CMAKE_DEPENDENT_OPTION(SALOME_PARAVIS_MINIMAL_CORBA "Build PARAVIS with a minimal CORBA interface" OFF
+ "NOT SALOME_LIGHT_ONLY" ON)
IF(SALOME_BUILD_TESTS)
ENABLE_TESTING()
# GUI itself has to be loaded AFTER ParaView: the ParaView config doesn't mix
# well with the VTK one (and GUI loads VTK):
FIND_PACKAGE(SalomeGUI REQUIRED)
+FULL_GUI(TRUE) # check whether GUI builded in full mode and with CORBA
ADD_DEFINITIONS(${GUI_DEFINITIONS})
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
ELSE()
MESSAGE(FATAL_ERROR "We absolutely need the Salome MED module to build plugins, please define MED_ROOT_DIR")
ENDIF()
- IF(SALOME_MED_STANDALONE)
- MESSAGE(FATAL_ERROR "We absolutely need a Salome MED with KERNEL, please set SALOME_MED_STANDALONE=OFF in MED module
+ 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(SALOME_MED_STANDALONE)
+ ENDIF()
FIND_PACKAGE(SalomeMEDFile)
SALOME_LOG_OPTIONAL_PACKAGE(MEDFile SALOME_PARAVIS_BUILD_PLUGINS)
ENDIF()
## Generation of the list of VTK classes (to be wrapped into IDLs)
## =====================================
IF(NOT SALOME_LIGHT_ONLY AND NOT SALOME_PARAVIS_MINIMAL_CORBA)
+ ADD_DEFINITIONS(-DPARAVIS_WITH_FULL_CORBA)
# TODO: the below requires ParaView in the PYTHONPATH ... not so nice:
MESSAGE(STATUS "Generating list of wrapped VTK classes ...")
LIST(GET PARAVIEW_INCLUDE_DIRS 0 PARAVIEW_INCLUDE_DIR0)
IF(SALOME_BUILD_DOC)
ADD_SUBDIRECTORY(doc)
ENDIF()
-IF(SALOME_BUILD_TESTS)
+IF(SALOME_BUILD_TESTS AND NOT SALOME_LIGHT_ONLY)
ADD_SUBDIRECTORY(test)
ENDIF()
ADD_SUBDIRECTORY(bin)
# List of targets in this project we want to make visible to the rest of the world.
# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
-SET(_${PROJECT_NAME}_exposed_targets
- SalomeIDLPARAVIS PARAVIS PARAVISEngine
-)
+IF(NOT SALOME_LIGHT_ONLY)
+ SET(_${PROJECT_NAME}_exposed_targets SalomeIDLPARAVIS PARAVISEngine PARAVIS)
-# Add all targets to the build-tree export set
-EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
- FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
+ # Add all targets to the build-tree export set
+ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
+ FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
+ENDIF()
# Create the configuration files:
# - in the build tree:
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}")
-# Install the export set for use with the install-tree
-INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
- FILE ${PROJECT_NAME}Targets.cmake)
+IF(NOT SALOME_LIGHT_ONLY)
+ # Install the export set for use with the install-tree
+ INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
+ FILE ${PROJECT_NAME}Targets.cmake)
+ENDIF()
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-IF(SALOME_PARAVIS_MINIMAL_CORBA)
- # Use another set of Python files redirecting the API directly
- # to the original ParaView modules.
- SET(_PYFILES_TO_INSTALL
- paravis.py
+SET(_PYFILES_TO_INSTALL)
+
+IF(SALOME_LIGHT_ONLY)
+ LIST(APPEND _PYFILES_TO_INSTALL
pvsimple.py
presentations.py
- paravisSM.py
- )
-ELSE()
- SET(_PYFILES_TO_INSTALL
- VTKWrapping/paravis.py
- VTKWrapping/paravisSM.py
- VTKWrapping/pvsimple.py
- VTKWrapping/presentations.py
)
-ENDIF()
+ELSE(SALOME_LIGHT_ONLY)
+ IF(SALOME_PARAVIS_MINIMAL_CORBA)
+ # Use another set of Python files redirecting the API directly
+ # to the original ParaView modules.
+ LIST(APPEND _PYFILES_TO_INSTALL
+ paravis.py
+ pvsimple.py
+ presentations.py
+ paravisSM.py
+ )
+ ELSE()
+ LIST(APPEND _PYFILES_TO_INSTALL
+ VTKWrapping/paravis.py
+ VTKWrapping/paravisSM.py
+ VTKWrapping/pvsimple.py
+ VTKWrapping/presentations.py
+ )
+ ENDIF()
+ENDIF(SALOME_LIGHT_ONLY)
INSTALL_AND_COMPILE_PYTHON_FILE("${_PYFILES_TO_INSTALL}" ${SALOME_INSTALL_SCRIPT_PYTHON})