Skip to content

COMP: Fix configuration error with VTK OpenGL2 backend

Created by: msmolens

This commit fixes a CMake error when building Slicer configured with:

Slicer_VTK_RENDERING_BACKEND:STRING=OpenGL2

The error is:

39>  Performing configure step for 'Slicer'
...
39>  -- Found Qt4: C:/dev/Support/qt-4.8.7-64-vs2013-deb/bin/qmake.exe (found version "4.8.7")
39>  -- Configuring Slicer with Qt 4.8.7 (using modules: QTCORE, QTGUI, QTNETWORK, QTOPENGL, QTUITOOLS, QTXML, QTXMLPATTERNS, QTWEBKIT, QTSVG, QTSQL, PHONON, QTSCRIPT, QTTEST, )
39>  -- Configuring Slicer for [win-amd64]
39>  CMake Error at C:/dev/SB2/VTKv6/CMake/vtkModuleAPI.cmake:120 (message):
39>    Requested modules not available:
39>
39>      vtkGUISupportQtOpenGL
39>  Call Stack (most recent call first):
39>    C:/dev/SB2/VTKv6-build/VTKConfig.cmake:67 (vtk_module_config)
39>    CMakeLists.txt:790 (find_package)

When using the OpenGL backend the vtkGUISupportQtOpenGL module is built because of the CMake setting VTK_Group_Qt:BOOL=ON. When using the OpenGL2 backend it's necessary to explicitly enable the vtkGUISupportQtOpenGL module. In this case, the module is not part of the Qt group. See [1].

[1] https://github.com/Slicer/VTK/blob/fe92273888219edca422f3a308761ddcd2882e2b/GUISupport/QtOpenGL/module.cmake#L1-L3

Merge request reports

Loading