Salome HOME
Start potring to the VTK OpenGL2 backend.
[modules/gui.git] / CMakeLists.txt
index 1ef75e6b88728322d627d0690b077aab426738af..d15f636ef9ac49864fc5ad313a3464140d17fa6b 100755 (executable)
@@ -204,10 +204,15 @@ IF(SALOME_USE_VTKVIEWER)
   # Required components are listed in the FindSalomeVTK.cmake file: 
   FIND_PACKAGE(SalomeVTK) 
   SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER)
+  IF(${VTK_RENDERING_BACKEND} STREQUAL "OpenGL2")
+    ADD_DEFINITIONS("-DVTK_OPENGL2")
+    SET(SALOME_GUI_USE_OPENGL2 TRUE)
+  ENDIF()
 ELSE()
   ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
 ENDIF()
 
+
 # - Plot2d viewer: Qwt
 IF(SALOME_USE_PLOT2DVIEWER)
   FIND_PACKAGE(SalomeQwt)
@@ -325,11 +330,17 @@ INCLUDE(CMakePackageConfigHelpers)
 # 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 
-    caf CAM CASCatch DDS Event LightApp LogWindow ObjBrowser
+    CAM CASCatch DDS Event LightApp LogWindow ObjBrowser
     QDS qtx SalomePrs SalomeStyle std SUITApp suit ViewerTools ViewerData
     ImageComposer
 )
 
+# CAF package (not compilable while TDocStd_Application::Formats is removed)
+IF(CAS_VERSION_STR VERSION_LESS "7.0.1")
+  LIST(APPEND _${PROJECT_NAME}_exposed_targets 
+       caf)
+ENDIF()
+
 IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
   LIST(APPEND _${PROJECT_NAME}_exposed_targets 
        OpenGLUtils)