Commit d978f250 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri Committed by Kitware Robot

Merge topic 'infovis_examples'

f67eb6c5 Fix module loading for Infovis examples
caae2cb5 Fix missing dependencies in infovis examples
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1606
parents 563a8a4d f67eb6c5
Pipeline #18277 running with stage
......@@ -64,7 +64,6 @@ if(VTK_QT_VERSION VERSION_GREATER "4")
${UI_Srcs}
${MOC_Srcs}
${QRC_Srcs}
${QRC_Srcs}
)
add_executable(SimpleView MACOSX_BUNDLE
......
......@@ -6,14 +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
vtkIOInfovis
vtkIOSQL
vtkInfovisLayout
vtkInteractionStyle
vtkRenderingLabel
vtkInfovisLayout
vtkIOInfovis
vtkRendering${VTK_RENDERING_BACKEND}
vtkViewsInfovis
)
if(TARGET vtkGUISupportQt AND
TARGET vtkViewsQt)
set(VTK_Modules ${VTK_Modules}
vtkGUISupportQt
vtkViewsQt
)
endif()
vtk_module_config(VTK
${VTK_Modules}
)
include(${VTK_USE_FILE})
......@@ -35,10 +49,12 @@ 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)
add_subdirectory(StatsView)
if(vtkIOSQL_LOADED)
add_subdirectory(StatsView)
endif()
endif()
if(vtkInfovisParallel_LOADED)
......
......@@ -14,7 +14,19 @@ endif()
project(CustomLinkView)
find_package(VTK)
find_package(VTK REQUIRED)
vtk_module_config(VTK
vtkCommonCore
vtkCommonDataModel
vtkFiltersGeneral
vtkGUISupportQt
vtkIOInfovis
vtkInfovisCore
vtkRendering${VTK_RENDERING_BACKEND}
vtkViewsCore
vtkViewsInfovis
vtkViewsQt
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
......
......@@ -14,7 +14,17 @@ endif()
project(EasyView)
find_package(VTK)
find_package(VTK REQUIRED)
vtk_module_config(VTK
vtkCommonCore
vtkCommonDataModel
vtkGUISupportQt
vtkIOInfovis
vtkInfovisCore
vtkViewsCore
vtkViewsInfovis
vtkViewsQt
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
......@@ -46,14 +56,25 @@ if(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
endif(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
if(VTK_QT_VERSION VERSION_GREATER "4")
find_package(Qt5 COMPONENTS Widgets)
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(Qt5 COMPONENTS Widgets REQUIRED QUIET)
qt5_wrap_ui(UI_Srcs ${UIs})
qt5_add_resources(Rcs_Srcs ${Rcs})
set_source_files_PROPERTIES(${Srcs} PROPERTIES
OBJECT_DEPENDS "${UI_Srcs}")
source_group("Resources" FILES
${UIs}
${Rcs}
${EXE_ICON} # Not present
)
source_group("Generated" FILES
${UI_Srcs}
${MOC_Srcs}
${Rcs_Srcs}
)
# set_source_files_PROPERTIES(${Srcs} PROPERTIES
# OBJECT_DEPENDS "${UI_Srcs}")
add_executable(EasyView
MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${Rcs_Srcs})
......
......@@ -8,6 +8,7 @@
#include "ui_EasyView.h"
#include "EasyView.h"
// VTK includes
#include <vtkAnnotationLink.h>
#include <vtkDataObjectToTable.h>
#include <vtkDataRepresentation.h>
......@@ -24,8 +25,7 @@
#include <vtkViewUpdater.h>
#include <vtkXMLTreeReader.h>
// Qt includes
#include <QDir>
#include <QFileDialog>
#include <QTreeView>
......
......@@ -14,7 +14,16 @@ endif()
project(StatsView)
find_package(VTK)
find_package(VTK REQUIRED)
vtk_module_config(VTK
vtkCommonDataModel
vtkFiltersStatistics
vtkIOInfovis
vtkIOSQL
vtkInfovisCore
vtkViewsCore
vtkViewsQt
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
......
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