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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc65543..5bccbce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,12 +158,9 @@ if (WITH_TESTS)
endif()
add_subdirectory(dimbuilder)
add_subdirectory(vendor/arbiter)
-add_subdirectory(vendor/schema-validator)
add_subdirectory(vendor/kazhdan)
add_subdirectory(vendor/lazperf)
-add_subdirectory(vendor/utfcpp)
add_subdirectory(vendor/lepcc)
-add_subdirectory(vendor/h3)
add_subdirectory(tools)
add_subdirectory(apps)
@@ -230,12 +227,13 @@ add_library(PDAL::PDAL ALIAS ${PDAL_LIB_NAME})
+find_package(Eigen3 CONFIG REQUIRED)
+target_link_libraries(${PDAL_LIB_NAME} PRIVATE Eigen3::Eigen)
target_include_directories(${PDAL_LIB_NAME}
SYSTEM BEFORE PRIVATE
- ${PDAL_VENDOR_EIGEN_DIR}
${PDAL_VENDOR_DIR}/kazhdan
- ${PDAL_VENDOR_DIR}/h3/include
)
+target_link_libraries(${PDAL_LIB_NAME} PRIVATE h3::h3)
target_include_directories(${PDAL_LIB_NAME}
PRIVATE
${ROOT_DIR}
@@ -263,6 +261,8 @@ target_link_libraries(${PDAL_LIB_NAME}
${PDAL_LIBDIR}
${WINSOCK_LIBRARY}
)
+find_package(nanoflann CONFIG REQUIRED)
+target_link_libraries(${PDAL_LIB_NAME} PRIVATE nanoflann::nanoflann)
if (ZSTD_FOUND)
target_link_libraries(${PDAL_LIB_NAME}
@@ -307,9 +307,6 @@ target_include_directories(${PDAL_LIB_NAME}
INTERFACE
$<INSTALL_INTERFACE:include>)
-target_compile_definitions(${PDAL_LIB_NAME}
- PRIVATE
- H3_PREFIX=PDALH3)
if(WIN32)
target_compile_definitions(${PDAL_LIB_NAME}
diff --git a/cmake/gdal.cmake b/cmake/gdal.cmake
index 5f68579..a407c60 100644
--- a/cmake/gdal.cmake
+++ b/cmake/gdal.cmake
@@ -12,7 +12,8 @@ function(gdal_find_version _version)
set(${_version} ${MAJOR}.${MINOR}.${REV} PARENT_SCOPE)
endfunction(gdal_find_version)
-find_package(GDAL 3.4 REQUIRED)
+find_package(GDAL CONFIG REQUIRED)
+set(GDAL_LIBRARY GDAL::GDAL)
set_package_properties(GDAL PROPERTIES TYPE REQUIRED
PURPOSE "Provides general purpose raster, vector, and reference system support")
if (GDAL_FOUND)
diff --git a/cmake/h3.cmake b/cmake/h3.cmake
index 398ad6d..fb3c9ad 100644
--- a/cmake/h3.cmake
+++ b/cmake/h3.cmake
@@ -2,5 +2,6 @@
# H3 configuration.
#
-set(PDAL_H3_LIB_NAME pdal_h3)
+find_package(h3 CONFIG REQUIRED)
+set(PDAL_H3_LIB_NAME h3::h3)
diff --git a/cmake/schema-validator.cmake b/cmake/schema-validator.cmake
index 1f9f996..aeb598c 100644
--- a/cmake/schema-validator.cmake
+++ b/cmake/schema-validator.cmake
@@ -1,5 +1,5 @@
#
# N Lohmann JSON schema validator handler
#
-include(${PDAL_CMAKE_DIR}/nlohmann.cmake)
-set(JSON_SCHEMA_LIB_NAME pdal_json_schema)
+find_package(nlohmann_json_schema_validator CONFIG REQUIRED)
+set(JSON_SCHEMA_LIB_NAME nlohmann_json_schema_validator::validator)
diff --git a/cmake/utfcpp.cmake b/cmake/utfcpp.cmake
index 6543ff6..dc6fac8 100644
--- a/cmake/utfcpp.cmake
+++ b/cmake/utfcpp.cmake
@@ -1,6 +1,7 @@
#
# UTF CPP
#
-set(UTFCPP_INCLUDE_DIR ${PDAL_VENDOR_DIR}/utfcpp/source)
+find_package(utf8cpp CONFIG REQUIRED)
+set(UTFCPP_INCLUDE_DIR "")
set(UTFCPP_LIB_NAME utf8::cpp)
diff --git a/pdal/JsonFwd.hpp b/pdal/JsonFwd.hpp
index f764961..f64dcc6 100644
--- a/pdal/JsonFwd.hpp
+++ b/pdal/JsonFwd.hpp
@@ -1,3 +1,4 @@
+#include <nlohmann/json_fwd.hpp>
#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
#define INCLUDE_NLOHMANN_JSON_FWD_HPP_
diff --git a/pdal/private/KDImpl.hpp b/pdal/private/KDImpl.hpp
index 473ffba..a69431f 100644
--- a/pdal/private/KDImpl.hpp
+++ b/pdal/private/KDImpl.hpp
@@ -34,7 +34,8 @@
#pragma once
-#include <nanoflann/nanoflann.hpp>
+#include <nanoflann.hpp>
+#define SearchParams SearchParameters
namespace pdal
{
@@ -116,7 +117,7 @@ public:
PointIdList radius(double const& x, double const& y, double const& r) const
{
PointIdList output;
- std::vector<std::pair<std::size_t, double>> ret_matches;
+ std::vector<nanoflann::ResultItem<std::size_t, double>> ret_matches;
nanoflann::SearchParams params;
params.sorted = true;
@@ -247,7 +248,7 @@ public:
PointIdList radius(double x, double y, double z, double r) const
{
PointIdList output;
- std::vector<std::pair<std::size_t, double>> ret_matches;
+ std::vector<nanoflann::ResultItem<std::size_t, double>> ret_matches;
nanoflann::SearchParams params;
params.sorted = true;
@@ -330,7 +331,7 @@ public:
PointIdList radius(PointId idx, double r) const
{
PointIdList output;
- std::vector<std::pair<std::size_t, double>> ret_matches;
+ std::vector<nanoflann::ResultItem<std::size_t, double>> ret_matches;
nanoflann::SearchParams params;
params.sorted = true;
diff --git a/tools/lasdump/CMakeLists.txt b/tools/lasdump/CMakeLists.txt
index b15d595..a452d14 100644
--- a/tools/lasdump/CMakeLists.txt
+++ b/tools/lasdump/CMakeLists.txt
@@ -10,6 +10,7 @@ add_executable(lasdump
)
target_link_libraries(lasdump PRIVATE
+ ${UTFCPP_LIB_NAME}
${PDAL_LAZPERF_LIB_NAME}
${GDAL_LIBRARY}
)
|