Files
macports-ports/science/gdcm/files/patch-vtk_components.diff
T
2026-06-24 20:03:16 -04:00

37 lines
1.2 KiB
Diff

# Use only needed VTK components, not all possible ones. Reduce dependencies.
# https://discourse.vtk.org/t/could-not-find-libproj/15779
--- CMakeLists.txt.orig 2026-06-18 10:24:52
+++ CMakeLists.txt 2026-06-21 15:55:45
@@ -717,7 +717,29 @@
if(GDCM_USE_VTK)
option(GDCM_USE_PARAVIEW "paraview plugin ?" OFF)
# needed here so that we have VTK_WRAP_PYTHON and al. available
- find_package(VTK REQUIRED)
+
+ if("${VTK_MAJOR_VERSION}" LESS 9)
+ find_package(VTK REQUIRED)
+ else()
+ # VTK components list was extracted from Utilities/VTK/vtkgdcm.module.
+ # Classifications were ignored. For future, some modules may be optional.
+ # Outer signature copied from openEMS/CMakeLists.txt.
+ find_package(VTK REQUIRED COMPONENTS
+ CommonCore
+ CommonDataModel
+ CommonExecutionModel
+ IOImage
+ IOLegacy
+ ImagingSources
+ CommonMisc
+ ImagingCore
+ IOCore
+ InteractionStyle
+ RenderingCore
+ TestingCore
+ NO_MODULE REQUIRED)
+ endif()
+
mark_as_advanced(VTK_DIR)
set(GDCM_VTK_DIR ${VTK_DIR})
mark_as_advanced(GDCM_USE_PARAVIEW)