summaryrefslogtreecommitdiff
path: root/sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch
blob: 98ab24334fd46a85ba0e10e5bac966accace0ddb (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From: ccee5db79d6037c4d752b5f29dc30fb0dfd039bf Mon Sep 17 00:00:00 2001
From: Timothée Couble <timothee.couble@kitware.com>
From: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10692
Date: Fri, 10 Nov 2023 10:03:07 +0100
Subject: [PATCH 1/2] IOPDAL: Always links with pdalcpp

pdal_base and pdal_utils libraries are removed in PDAL 2.6.0
link with pdalcpp instead starting from this version.
---
 IO/PDAL/CMakeLists.txt | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/IO/PDAL/CMakeLists.txt b/IO/PDAL/CMakeLists.txt
index c31af0410f4..b83a9334109 100644
--- a/IO/PDAL/CMakeLists.txt
+++ b/IO/PDAL/CMakeLists.txt
@@ -3,14 +3,20 @@ vtk_module_find_package(PACKAGE PDAL VERSION 2.1)
 set(classes
   vtkPDALReader)
 
-set(pdal_libraries pdal_util)
-if (APPLE OR WIN32)
+set(pdal_libraries)
+if (PDAL_VERSION VERSION_LESS "2.6")
+  set(pdal_libraries pdal_util)
+  if (APPLE OR WIN32)
+    list(APPEND pdal_libraries
+      pdalcpp)
+  else()
+    list(APPEND pdal_libraries
+      pdal_base)
+  endif()
+else ()
   list(APPEND pdal_libraries
     pdalcpp)
-else()
-  list(APPEND pdal_libraries
-    pdal_base)
-endif()
+endif ()
 
 vtk_module_add_module(VTK::IOPDAL
   CLASSES ${classes})
-- 
GitLab


From 5bf45b44760bac09b0079827346e78af38d981af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Couble?= <timothee.couble@kitware.com>
Date: Fri, 10 Nov 2023 10:12:32 +0100
Subject: [PATCH 2/2] Add support for PDAL 2.0 version

---
 IO/PDAL/CMakeLists.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/IO/PDAL/CMakeLists.txt b/IO/PDAL/CMakeLists.txt
index b83a9334109..a7027524e4f 100644
--- a/IO/PDAL/CMakeLists.txt
+++ b/IO/PDAL/CMakeLists.txt
@@ -23,4 +23,13 @@ vtk_module_add_module(VTK::IOPDAL
 vtk_module_link(VTK::IOPDAL
   PRIVATE
     ${pdal_libraries})
+
+# PDAL 2.0 didn't include interfaces to its exported targets.
+# Resolved in https://github.com/PDAL/PDAL/issues/2262.
+if (PDAL_VERSION VERSION_LESS "2.1")
+  vtk_module_include(VTK::IOPDAL
+    PRIVATE
+      ${PDAL_INCLUDE_DIRS})
+endif ()
+
 vtk_add_test_mangling(VTK::IOPDAL)
-- 
GitLab