ADD_DEFINITIONS(-DWITH_SALOMEDS_OBSERVER)
ENDIF()
+# Single-study GUI
IF(SALOME_USE_SINGLE_DESKTOP)
ADD_DEFINITIONS(-DSINGLE_DESKTOP)
ENDIF()
# OCCT
FIND_PACKAGE(SalomeCAS REQUIRED)
-IF(NOT SALOME_USE_OCCVIEWER)
- ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
+
+# OpenGL
+IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
+ FIND_PACKAGE(SalomeOpenGL REQUIRED)
ENDIF()
# Qt4
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebKit QtOpenGL)
INCLUDE(${QT_USE_FILE})
+# PyQt4
FIND_PACKAGE(SalomePyQt4 REQUIRED)
# Optional prerequisites for GUI
-IF(SALOME_USE_GLVIEWER)
- FIND_PACKAGE(SalomeOpenGL)
- SALOME_LOG_OPTIONAL_PACKAGE(OpenGL SALOME_USE_GLVIEWER)
-ELSE()
+IF(NOT SALOME_USE_GLVIEWER)
ADD_DEFINITIONS("-DDISABLE_GLVIEWER")
ENDIF()
+IF(NOT SALOME_USE_OCCVIEWER)
+ ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
+ENDIF()
IF(SALOME_USE_VTKVIEWER)
# Required components are listed in the FindSalomeVTK.cmake file:
FIND_PACKAGE(SalomeVTK)
ELSE()
ADD_DEFINITIONS("-DDISABLE_PVVIEWER")
ENDIF()
-
IF (NOT SALOME_USE_GRAPHICSVIEW)
ADD_DEFINITIONS("-DDISABLE_GRAPHICSVIEW")
ENDIF()
-
IF (NOT SALOME_USE_PYVIEWER)
ADD_DEFINITIONS("-DDISABLE_PYVIEWER")
ENDIF()
-
IF(SALOME_USE_PYCONSOLE)
# Build with obsolete Python module's methods
ADD_DEFINITIONS(-DCALL_OLD_METHODS)
ImageComposer
)
+IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ OpenGLUtils)
+ENDIF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
+
# SALOME object specific targets:
IF(SALOME_USE_SALOMEOBJECT)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
# GL specific targets:
IF(SALOME_USE_GLVIEWER)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
- OpenGLUtils GLViewer)
+ GLViewer)
ENDIF(SALOME_USE_GLVIEWER)
# VTK specific targets:
##
# Common packages
##
-SET(SUBDIRS_COMMON
- CASCatch Qtx HelpBrowser Style DDS QDS ObjBrowser SUIT SUITApp STD CAF
- CAM LogWindow Prs Event ViewerData ViewerTools ImageComposer GUI_PY
-)
+ADD_SUBDIRECTORY(CASCatch)
+ADD_SUBDIRECTORY(Qtx)
+ADD_SUBDIRECTORY(HelpBrowser)
+ADD_SUBDIRECTORY(Style)
+ADD_SUBDIRECTORY(DDS)
+ADD_SUBDIRECTORY(QDS)
+ADD_SUBDIRECTORY(ObjBrowser)
+ADD_SUBDIRECTORY(SUIT)
+ADD_SUBDIRECTORY(SUITApp)
+ADD_SUBDIRECTORY(STD)
+ADD_SUBDIRECTORY(CAF)
+ADD_SUBDIRECTORY(CAM)
+ADD_SUBDIRECTORY(LogWindow)
+ADD_SUBDIRECTORY(Prs)
+ADD_SUBDIRECTORY(Event)
+ADD_SUBDIRECTORY(ViewerData)
+ADD_SUBDIRECTORY(ViewerTools)
+ADD_SUBDIRECTORY(ImageComposer)
+ADD_SUBDIRECTORY(GUI_PY)
##
# SALOME object
##
IF(SALOME_USE_SALOMEOBJECT)
- SET(SUBDIRS_OBJECT OBJECT)
+ ADD_SUBDIRECTORY(OBJECT)
ENDIF(SALOME_USE_SALOMEOBJECT)
+##
+# OpenGL utils
+##
+IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
+ ADD_SUBDIRECTORY(OpenGLUtils)
+ENDIF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
+
##
# GL viewer
##
IF(SALOME_USE_GLVIEWER)
- SET(SUBDIRS_GLVIEWER OpenGLUtils GLViewer)
+ ADD_SUBDIRECTORY(GLViewer)
ENDIF(SALOME_USE_GLVIEWER)
##
# VTK viewer
##
IF(SALOME_USE_VTKVIEWER)
- SET(SUBDIRS_VTKVIEWER VTKViewer)
-
+ ADD_SUBDIRECTORY(VTKViewer)
IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND SUBDIRS_VTKVIEWER SVTK)
+ ADD_SUBDIRECTORY(SVTK)
ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_VTKVIEWER)
# OCC viewer
##
IF(SALOME_USE_OCCVIEWER)
- SET(SUBDIRS_OCCVIEWER OCCViewer)
-
+ ADD_SUBDIRECTORY(OCCViewer)
IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND SUBDIRS_OCCVIEWER SOCC)
+ ADD_SUBDIRECTORY(SOCC)
ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_OCCVIEWER)
# Plot2d viewer
##
IF(SALOME_USE_PLOT2DVIEWER)
- SET(SUBDIRS_PLOT2DVIEWER Plot2d)
-
+ ADD_SUBDIRECTORY(Plot2d)
IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND SUBDIRS_PLOT2DVIEWER SPlot2d)
+ ADD_SUBDIRECTORY(SPlot2d)
ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_PLOT2DVIEWER)
# Qx scene viewer
##
IF(SALOME_USE_QXGRAPHVIEWER)
- SET(SUBDIRS_QXGRAPHVIEWER QxScene)
+ ADD_SUBDIRECTORY(QxScene)
ENDIF(SALOME_USE_QXGRAPHVIEWER)
# Graphics viewer
##
IF(SALOME_USE_GRAPHICSVIEW)
- SET(SUBDIRS_GRAPHICSVIEW GraphicsView)
+ ADD_SUBDIRECTORY(GraphicsView)
ENDIF(SALOME_USE_GRAPHICSVIEW)
# ParaView Viewer
IF(SALOME_USE_PVVIEWER)
- SET(SUBDIRS_PVVIEWER PVViewer)
+ ADD_SUBDIRECTORY(PVViewer)
ENDIF()
##
# Python Viewer
##
IF(SALOME_USE_PYVIEWER)
- SET(SUBDIRS_PYVIEWER PyEditor PyViewer)
+ ADD_SUBDIRECTORY(PyEditor)
+ ADD_SUBDIRECTORY(PyViewer)
ENDIF(SALOME_USE_PYVIEWER)
##
-# Python-based packages
+# Python-based packages, part 1 (generic)
##
IF(SALOME_USE_PYCONSOLE)
- SET(SUBDIRS_PYCONSOLE PyInterp PyConsole)
- SET(SUBDIRS_PYTHON SALOME_PYQT)
- IF(SALOME_USE_VTKVIEWER)
- LIST(APPEND SUBDIRS_PYTHON SALOME_PY)
- ENDIF()
- IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND SUBDIRS_PYTHON SALOME_SWIG)
- ENDIF()
+ ADD_SUBDIRECTORY(PyInterp)
+ ADD_SUBDIRECTORY(PyConsole)
+ ADD_SUBDIRECTORY(SALOME_PYQT)
ENDIF(SALOME_USE_PYCONSOLE)
##
# Light SALOME packages
##
-SET(SUBDIRS_LIGHT LightApp ResExporter)
+ADD_SUBDIRECTORY(LightApp)
+ADD_SUBDIRECTORY(ResExporter)
+
+##
+# Python-based packages, part 2 (LightApp-dependent)
+##
+IF(SALOME_USE_PYCONSOLE)
+ IF(SALOME_USE_VTKVIEWER)
+ ADD_SUBDIRECTORY(SALOME_PY)
+ ENDIF(SALOME_USE_VTKVIEWER)
+ IF(SALOME_USE_SALOMEOBJECT)
+ ADD_SUBDIRECTORY(SALOME_SWIG)
+ ENDIF(SALOME_USE_VTKVIEWER)
+ENDIF(SALOME_USE_PYCONSOLE)
##
# Full (CORBA) SALOME packages
##
IF(NOT SALOME_LIGHT_ONLY)
- SET(SUBDIRS_CORBA TOOLSGUI SalomeApp Session GuiHelpers TreeData)
+ ADD_SUBDIRECTORY(TOOLSGUI)
+ ADD_SUBDIRECTORY(SalomeApp)
+ ADD_SUBDIRECTORY(Session)
+ ADD_SUBDIRECTORY(GuiHelpers)
+ ADD_SUBDIRECTORY(TreeData)
ENDIF(NOT SALOME_LIGHT_ONLY)
-
-SET(SUBDIRS
- ${SUBDIRS_COMMON}
- ${SUBDIRS_OBJECT}
- ${SUBDIRS_GLVIEWER}
- ${SUBDIRS_VTKVIEWER}
- ${SUBDIRS_OCCVIEWER}
- ${SUBDIRS_PLOT2DVIEWER}
- ${SUBDIRS_QXGRAPHVIEWER}
- ${SUBDIRS_PVVIEWER}
- ${SUBDIRS_GRAPHICSVIEW}
- ${SUBDIRS_PYVIEWER}
- ${SUBDIRS_PYCONSOLE}
- ${SUBDIRS_LIGHT}
- ${SUBDIRS_CORBA}
- ${SUBDIRS_PYTHON}
-)
-
-FOREACH(dir ${SUBDIRS})
- ADD_SUBDIRECTORY(${dir})
-ENDFOREACH(dir ${SUBDIRS})
-