summaryrefslogtreecommitdiff
path: root/sci-libs/pcl/files/pcl-1.12.0-cmake-targets.patch
blob: 408216747792242e389c5c4a7fabf3f0f70178dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
https://github.com/PointCloudLibrary/pcl/pull/5012
https://bugs.gentoo.org/810853

From: Maarten de Vries <maarten@de-vri.es>
Date: Wed, 3 Nov 2021 21:40:19 +0100
Subject: [PATCH] Limit VTK_LIBRARIES to wanted components for VTK 9.0.

--- a/cmake/pcl_find_vtk.cmake
+++ b/cmake/pcl_find_vtk.cmake
@@ -119,6 +119,15 @@ else()
   unset(HAVE_QVTK)
 endif()
 
+# Overwrite VTK_LIBRARIES with only the set we actually want for VTK >= 9.0.
+# Otherwise, it will contain ALL available components.
+if(NOT (VTK_VERSION VERSION_LESS 9.0))
+  set(VTK_LIBRARIES)
+  foreach(vtkComponent ${PCL_VTK_COMPONENTS})
+    list(APPEND VTK_LIBRARIES VTK::${vtkComponent})
+  endforeach()
+endif()
+
 if(PCL_SHARED_LIBS OR (NOT (PCL_SHARED_LIBS) AND NOT (VTK_BUILD_SHARED_LIBS)))
   if(VTK_VERSION VERSION_LESS 9.0)
     if(VTK_USE_FILE)