Commit f67eb6c5 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri

Fix module loading for Infovis examples

The super-directory Examples/Infovis/Cxx was loading required
VTK modules and including the VTK_USE_FILE.
Once this file is included, CMake prevents any projects from its
subdirectories from including it again. This would not let the
sub-projects from linking to more modules than the main project.
parent caae2cb5
Pipeline #18275 passed with stage
......@@ -6,17 +6,28 @@ endif()
project(Infovis)
find_package(VTK REQUIRED)
vtk_module_config(VTK
# List of VTK_Modules required from VTK
# for all examples in this directory and its subdirectories to work.
set(VTK_Modules
vtkCommonCore
vtkFiltersSources
vtkGUISupportQt
vtkIOInfovis
vtkIOSQL
vtkInfovisLayout
vtkInteractionStyle
vtkRenderingLabel
vtkViewsInfovis
vtkViewsQt
)
if(TARGET vtkGUISupportQt AND
TARGET vtkViewsQt)
set(VTK_Modules ${VTK_Modules}
vtkGUISupportQt
vtkViewsQt
)
endif()
vtk_module_config(VTK
${VTK_Modules}
)
include(${VTK_USE_FILE})
......@@ -38,7 +49,7 @@ if(vtkViewsInfovis_LOADED)
endif()
# If Qt is enabled include the QT based examples
if(vtkGUISupportQt_LOADED)
if(vtkGUISupportQt_LOADED AND vtkViewsQt_LOADED)
add_subdirectory(EasyView)
add_subdirectory(CustomLinkView)
if(vtkIOSQL_LOADED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment