Commit 8d352e71 authored by Ben Boeckel's avatar Ben Boeckel

cmake: find VTK and ParaView with components

By default, they'll import all modules. This inflates the number of
include directories used and breaks build directories with long names on
Windows due to the short command line length limits.
parent 5722b9a8
Pipeline #65931 passed with stage
......@@ -277,7 +277,7 @@ endif()
if(SMTK_ENABLE_PARAVIEW_SUPPORT)
# include ParaView and ensure it is using the OpenGL2 backend
find_package(ParaView)
find_package(ParaView COMPONENTS vtkRenderingOpenGL2)
endif()
################################################################################
......@@ -289,7 +289,7 @@ if(SMTK_ENABLE_VTK_SUPPORT AND NOT SMTK_ENABLE_PARAVIEW_SUPPORT)
# be careful not to include the VTK_USE_FILE until inside
# a subdirectory that requires it; otherwise the list of include
# paths can become too long for some platforms.
find_package(VTK REQUIRED)
find_package(VTK REQUIRED COMPONENTS vtkRenderingOpenGL2)
endif()
if (SMTK_ENABLE_PARAVIEW_SUPPORT OR SMTK_ENABLE_VTK_SUPPORT)
......
......@@ -2,7 +2,12 @@ smtk_find_package_qt(qt_targets REQUIRED
QT4_COMPONENTS QtCore QtGui
QT5_COMPONENTS Core Widgets)
find_package( VTK REQUIRED )
find_package( VTK REQUIRED
COMPONENTS
vtkInteractionStyle
vtkRenderingFreeType
vtkRenderingOpenGL2
vtkDomainsChemistryOpenGL2 )
include_directories(${VTK_INCLUDE_DIRS})
set(OpenCVOperatorsHeaders imageFeatureExtractorWidget.h)
......
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