-MACRO(FULL_GUI with_corba)
- SET(_options)
- IF(${with_corba} AND ${SALOME_GUI_LIGHT_ONLY})
- SET(_corba_message "We absolutely need a Salome GUI module with CORBA.\nPlease set option SALOME_LIGHT_ONLY to OFF when building GUI module.")
- ENDIF()
-
- LIST(APPEND _options SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_VTKVIEWER
- SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_QXGRAPHVIEWER
- SALOME_USE_SALOMEOBJECT SALOME_USE_PYCONSOLE)
-
- SET(_message)
- FOREACH(_option ${_options})
- IF(NOT ${_option})
- LIST(APPEND _message ${_option})
- ENDIF()
- ENDFOREACH()
- IF(_message)
- SET(_message "We absolutely need a Salome GUI module in full mode.\nThe following options should be set to ON when building GUI module:\n${_message}\n")
- IF(_corba_message)
- MESSAGE(FATAL_ERROR "${_corba_message}\n${_message}")
+# Notes:
+# - The arguments list can include "OPTIONAL" keywords:
+# * All arguments preceded by "OPTIONAL" keyword are mandatory for current module.
+# If GUI module was compiled without this functionality, further installation
+# of the current module becomes impossible.
+# * All arguments following "OPTIONAL" keyword are optional for current module, which
+# uses this functionality, but can be installed without it.
+#
+# - At present there are next options in the GUI module:
+# SALOME_USE_OCCVIEWER, SALOME_USE_VTKVIEWER, SALOME_USE_GLVIEWER, SALOME_USE_PLOT2DVIEWER,
+# SALOME_USE_GRAPHICSVIEW, SALOME_USE_QXGRAPHVIEWER, SALOME_USE_PVVIEWER, SALOME_USE_PYVIEWER,
+# SALOME_USE_PYCONSOLE, SALOME_USE_SALOMEOBJECT
+#
+# Example of usage:
+# SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_SALOMEOBJECT OPTIONAL SALOME_USE_PYCONSOLE)
+#
+MACRO(SALOME_GUI_MODE)
+ MESSAGE(STATUS "")
+ MESSAGE(STATUS " Checking status of GUI options")
+ MESSAGE(STATUS " ==================================== ")
+ MESSAGE(STATUS "")
+ SET(_message)
+ SET(_length 25)
+ SET(_is_optional OFF)
+ FOREACH(_option ${ARGN})
+ IF(${_option} STREQUAL "OPTIONAL")
+ SET(_is_optional ON)
+ MESSAGE(STATUS " Optional:")