Commit 3619c674 authored by jcfr's avatar jcfr

COMP: Specify minimum set of VTKv6 libraries. Fixes #3741

The VTK utility: Utilities/Maintenance/WhatModulesVTK.py discovers
which modules are used in a project. This patch modifies the Slicer
CMakeLists.txt file to only load the vtk modules used by Slicer. This
should reduce the number of libraries being linked.

This commit also updates CTK project including a patch reducing
the number of library associated with CTKImageProcessingITKCore library.

// ----------------
$ git shortlog 48ef9aeb8..282abc7 --no-merges
Jean-Christophe Fillion-Robin (1):
      CTKImageProcessingITKCore - With ITKv4, link only to the required libraries
// ----------------
Co-authored-by: Jean-Christophe Fillion-Robin's avatarJean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Bill Lorensen <bill.lorensen@gmail.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23350 3bd1e089-480b-0410-8dfb-8563597acbee
parent 6d4e2968
......@@ -587,6 +587,41 @@ set(Slicer_ITK_COMPONENTS
${ITK_IO_MODULES_USED}
)
#-----------------------------------------------------------------------------
# VTKv6 - Slicer_VTK_COMPONENTS
#-----------------------------------------------------------------------------
if(${VTK_VERSION_MAJOR} GREATER 5)
set(Slicer_VTK_COMPONENTS
vtkFiltersExtraction
vtkFiltersFlowPaths
vtkFiltersGeometry
vtkIOImage
vtkIOLegacy
vtkIOPLY
vtkIOXML
vtkImagingMath
vtkImagingMorphological
vtkImagingStatistics
vtkImagingStencil
vtkInteractionImage
vtkRenderingFreeTypeOpenGL
vtkRenderingQt
vtkRenderingVolumeOpenGL
vtkTestingRendering
vtkzlib
)
if(Slicer_USE_PYTHONQT)
list(APPEND Slicer_VTK_COMPONENTS
vtkWrappingPythonCore
)
endif()
if(UNIX AND NOT APPLE)
list(APPEND Slicer_VTK_COMPONENTS
vtkRenderingFreeTypeFontConfig
)
endif()
endif()
#-----------------------------------------------------------------------------
# Qt - Slicer_REQUIRED_QT_MODULES
#-----------------------------------------------------------------------------
......@@ -764,7 +799,7 @@ include(${ITK_USE_FILE})
# VTK
#-----------------------------------------------------------------------------
if(${VTK_VERSION_MAJOR} STREQUAL "6")
find_package(VTK 6.1 REQUIRED NO_MODULE)
find_package(VTK 6.1 COMPONENTS ${Slicer_VTK_COMPONENTS} REQUIRED NO_MODULE)
if(NOT TARGET vtkGUISupportQt)
message(FATAL_ERROR "error: VTK was not configured to use QT, you probably need "
"to recompile it with VTK_USE_GUISUPPORT ON, VTK_Group_Qt ON, "
......
......@@ -57,8 +57,8 @@ if(NOT DEFINED CTK_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY "${git_protocol}://github.com/CommonTK/CTK.git"
GIT_TAG "48ef9aeb89d01b3a50d2ad2e7d98a038329459bb"
GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTK.git"
GIT_TAG "282abc745a7db700a822822375d0b8c170ec1a56"
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
CMAKE_CACHE_ARGS
......
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