Skip to content

Commit c57bc94

Browse files
committed
Upgrade to PDAL 2.9
1 parent ae95969 commit c57bc94

13 files changed

+692
-274
lines changed

vcpkg-vendor/vcpkg-overlay-ports/pdal/cmake-project-include.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@ include(CheckIncludeFileCXX)
22

33
check_include_file_cxx("filesystem" HAVE_CXX17_FILESYSTEM)
44
if(NOT HAVE_CXX17_FILESYSTEM)
5-
message(FATAL_ERROR "Unable to find <filesystem> header. PDAL requires full C++17 compiler support.")
5+
message(
6+
FATAL_ERROR "Unable to find <filesystem> header. PDAL requires full C++17 compiler support.")
67
endif()
8+
9+
set_source_files_properties("${PROJECT_SOURCE_DIR}/io/OGRWriter.cpp" PROPERTIES COMPILE_DEFINITIONS
10+
NOMINMAX)
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index dc65543..5bccbce 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -158,12 +158,9 @@ if (WITH_TESTS)
6+
endif()
7+
add_subdirectory(dimbuilder)
8+
add_subdirectory(vendor/arbiter)
9+
-add_subdirectory(vendor/schema-validator)
10+
add_subdirectory(vendor/kazhdan)
11+
add_subdirectory(vendor/lazperf)
12+
-add_subdirectory(vendor/utfcpp)
13+
add_subdirectory(vendor/lepcc)
14+
-add_subdirectory(vendor/h3)
15+
add_subdirectory(vendor/spz)
16+
add_subdirectory(tools)
17+
add_subdirectory(apps)
18+
@@ -220,12 +217,13 @@ add_library(PDAL::PDAL ALIAS ${PDAL_LIB_NAME})
19+
20+
21+
22+
+find_package(Eigen3 CONFIG REQUIRED)
23+
+target_link_libraries(${PDAL_LIB_NAME} PRIVATE Eigen3::Eigen)
24+
target_include_directories(${PDAL_LIB_NAME}
25+
SYSTEM BEFORE PRIVATE
26+
- ${PDAL_VENDOR_EIGEN_DIR}
27+
${PDAL_VENDOR_DIR}/kazhdan
28+
- ${PDAL_VENDOR_DIR}/h3/include
29+
)
30+
+target_link_libraries(${PDAL_LIB_NAME} PRIVATE h3::h3)
31+
target_include_directories(${PDAL_LIB_NAME}
32+
PRIVATE
33+
${ROOT_DIR}
34+
@@ -263,6 +261,8 @@ target_link_libraries(${PDAL_LIB_NAME}
35+
${PDAL_LIBDIR}
36+
${WINSOCK_LIBRARY}
37+
)
38+
+find_package(nanoflann CONFIG REQUIRED)
39+
+target_link_libraries(${PDAL_LIB_NAME} PRIVATE nanoflann::nanoflann)
40+
41+
if (ZSTD_FOUND)
42+
target_link_libraries(${PDAL_LIB_NAME}
43+
@@ -307,9 +307,6 @@ target_include_directories(${PDAL_LIB_NAME}
44+
INTERFACE
45+
$<INSTALL_INTERFACE:include>)
46+
47+
-target_compile_definitions(${PDAL_LIB_NAME}
48+
- PRIVATE
49+
- H3_PREFIX=PDALH3)
50+
51+
if(WIN32)
52+
target_compile_definitions(${PDAL_LIB_NAME}
53+
diff --git a/cmake/gdal.cmake b/cmake/gdal.cmake
54+
index 5f68579..a407c60 100644
55+
--- a/cmake/gdal.cmake
56+
+++ b/cmake/gdal.cmake
57+
@@ -12,7 +12,8 @@ function(gdal_find_version _version)
58+
set(${_version} ${MAJOR}.${MINOR}.${REV} PARENT_SCOPE)
59+
endfunction(gdal_find_version)
60+
61+
-find_package(GDAL 3.4 REQUIRED)
62+
+find_package(GDAL CONFIG REQUIRED)
63+
+set(GDAL_LIBRARY GDAL::GDAL)
64+
set_package_properties(GDAL PROPERTIES TYPE REQUIRED
65+
PURPOSE "Provides general purpose raster, vector, and reference system support")
66+
if (GDAL_FOUND)
67+
diff --git a/cmake/h3.cmake b/cmake/h3.cmake
68+
index 398ad6d..fb3c9ad 100644
69+
--- a/cmake/h3.cmake
70+
+++ b/cmake/h3.cmake
71+
@@ -2,5 +2,6 @@
72+
# H3 configuration.
73+
#
74+
75+
-set(PDAL_H3_LIB_NAME pdal_h3)
76+
+find_package(h3 CONFIG REQUIRED)
77+
+set(PDAL_H3_LIB_NAME h3::h3)
78+
79+
diff --git a/cmake/schema-validator.cmake b/cmake/schema-validator.cmake
80+
index 1f9f996..aeb598c 100644
81+
--- a/cmake/schema-validator.cmake
82+
+++ b/cmake/schema-validator.cmake
83+
@@ -1,5 +1,5 @@
84+
#
85+
# N Lohmann JSON schema validator handler
86+
#
87+
-include(${PDAL_CMAKE_DIR}/nlohmann.cmake)
88+
-set(JSON_SCHEMA_LIB_NAME pdal_json_schema)
89+
+find_package(nlohmann_json_schema_validator CONFIG REQUIRED)
90+
+set(JSON_SCHEMA_LIB_NAME nlohmann_json_schema_validator::validator)
91+
diff --git a/cmake/utfcpp.cmake b/cmake/utfcpp.cmake
92+
index 6543ff6..dc6fac8 100644
93+
--- a/cmake/utfcpp.cmake
94+
+++ b/cmake/utfcpp.cmake
95+
@@ -1,6 +1,7 @@
96+
#
97+
# UTF CPP
98+
#
99+
-set(UTFCPP_INCLUDE_DIR ${PDAL_VENDOR_DIR}/utfcpp/source)
100+
+find_package(utf8cpp CONFIG REQUIRED)
101+
+set(UTFCPP_INCLUDE_DIR "")
102+
set(UTFCPP_LIB_NAME utf8::cpp)
103+
104+
diff --git a/pdal/JsonFwd.hpp b/pdal/JsonFwd.hpp
105+
index f764961..f64dcc6 100644
106+
--- a/pdal/JsonFwd.hpp
107+
+++ b/pdal/JsonFwd.hpp
108+
@@ -1,3 +1,4 @@
109+
+#include <nlohmann/json_fwd.hpp>
110+
#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
111+
#define INCLUDE_NLOHMANN_JSON_FWD_HPP_
112+
113+
diff --git a/pdal/private/KDImpl.hpp b/pdal/private/KDImpl.hpp
114+
index 473ffba..a69431f 100644
115+
--- a/pdal/private/KDImpl.hpp
116+
+++ b/pdal/private/KDImpl.hpp
117+
@@ -34,7 +34,8 @@
118+
119+
#pragma once
120+
121+
-#include <nanoflann/nanoflann.hpp>
122+
+#include <nanoflann.hpp>
123+
+#define SearchParams SearchParameters
124+
125+
namespace pdal
126+
{
127+
@@ -116,7 +117,7 @@ public:
128+
PointIdList radius(double const& x, double const& y, double const& r) const
129+
{
130+
PointIdList output;
131+
- std::vector<std::pair<std::size_t, double>> ret_matches;
132+
+ std::vector<nanoflann::ResultItem<std::size_t, double>> ret_matches;
133+
nanoflann::SearchParams params;
134+
params.sorted = true;
135+
136+
@@ -247,7 +248,7 @@ public:
137+
PointIdList radius(double x, double y, double z, double r) const
138+
{
139+
PointIdList output;
140+
- std::vector<std::pair<std::size_t, double>> ret_matches;
141+
+ std::vector<nanoflann::ResultItem<std::size_t, double>> ret_matches;
142+
nanoflann::SearchParams params;
143+
params.sorted = true;
144+
145+
@@ -330,7 +331,7 @@ public:
146+
PointIdList radius(PointId idx, double r) const
147+
{
148+
PointIdList output;
149+
- std::vector<std::pair<std::size_t, double>> ret_matches;
150+
+ std::vector<nanoflann::ResultItem<std::size_t, double>> ret_matches;
151+
nanoflann::SearchParams params;
152+
params.sorted = true;
153+
154+
diff --git a/tools/lasdump/CMakeLists.txt b/tools/lasdump/CMakeLists.txt
155+
index b15d595..a452d14 100644
156+
--- a/tools/lasdump/CMakeLists.txt
157+
+++ b/tools/lasdump/CMakeLists.txt
158+
@@ -10,6 +10,7 @@ add_executable(lasdump
159+
)
160+
161+
target_link_libraries(lasdump PRIVATE
162+
+ ${UTFCPP_LIB_NAME}
163+
${PDAL_LAZPERF_LIB_NAME}
164+
${GDAL_LIBRARY}
165+
)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/dimbuilder/CMakeLists.txt b/dimbuilder/CMakeLists.txt
2+
index 99109b7..fa2355d 100644
3+
--- a/dimbuilder/CMakeLists.txt
4+
+++ b/dimbuilder/CMakeLists.txt
5+
@@ -1,3 +1,6 @@
6+
+add_executable(dimbuilder IMPORTED GLOBAL)
7+
+set_target_properties(dimbuilder PROPERTIES IMPORTED_LOCATION "${DIMBUILDER_EXECUTABLE}")
8+
+return()
9+
#
10+
# The seemingly strange arrangement of this cmake file allows you to build
11+
# this application as a standalone.
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
diff --git a/cmake/libraries.cmake b/cmake/libraries.cmake
2-
index afac96030..c4819402c 100644
2+
index 6847cf6..47e9748 100644
33
--- a/cmake/libraries.cmake
44
+++ b/cmake/libraries.cmake
5-
@@ -1,9 +1,6 @@
6-
# Build shared libraries by default.
7-
5+
@@ -2,7 +2,6 @@
6+
87
set(PDAL_LIB_TYPE "SHARED")
9-
-if (WIN32)
8+
if (WIN32)
109
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_IMPORT_LIBRARY_SUFFIX})
11-
-endif()
12-
13-
14-
# Must be changed if there is an ABI change. This builds the SONAME
10+
endif()

vcpkg-vendor/vcpkg-overlay-ports/pdal/fix-dependency.patch

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)