early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,6 @@
include(CheckIncludeFileCXX)
check_include_file_cxx("filesystem" HAVE_CXX17_FILESYSTEM)
if(NOT HAVE_CXX17_FILESYSTEM)
message(FATAL_ERROR "Unable to find <filesystem> header. PDAL requires full C++17 compiler support.")
endif()

View File

@@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42cca1e..43b0ced 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -266,7 +265,7 @@ target_include_directories(${PDAL_BASE_LIB_NAME}
target_link_libraries(${PDAL_BASE_LIB_NAME}
PRIVATE
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
- ${GDAL_LIBRARY}
+ ${GDAL_LIBRARIES}
${GEOTIFF_LIBRARY}
${LIBXML2_LIBRARIES}
${ZLIB_LIBRARIES}
diff --git a/cmake/zstd.cmake b/cmake/zstd.cmake
index bfaa5b2..e73ec9e 100644
--- a/cmake/zstd.cmake
+++ b/cmake/zstd.cmake
@@ -4,7 +4,14 @@
option(WITH_ZSTD
"Build support for compression/decompression with Zstd." TRUE)
if (WITH_ZSTD)
- find_package(ZSTD QUIET)
+ find_package(ZSTD NAMES zstd REQUIRED)
+ set(ZSTD_INCLUDE_DIRS "")
+ if(TARGET zstd::libzstd_static)
+ set(ZSTD_LIBRARIES zstd::libzstd_static)
+ set(ZSTD_STATIC_LIB zstd::libzstd_static)
+ else()
+ set(ZSTD_LIBRARIES zstd::libzstd_shared)
+ endif()
set_package_properties(ZSTD PROPERTIES TYPE
PURPOSE "General compression support")
if (ZSTD_FOUND)

View File

@@ -0,0 +1,11 @@
diff --git a/cmake/libraries.cmake b/cmake/libraries.cmake
index 665bc53..fcdcf2c 100644
--- a/cmake/libraries.cmake
+++ b/cmake/libraries.cmake
@@ -1,6 +1,3 @@
# Build shared libraries by default.
set(PDAL_LIB_TYPE "SHARED")
-if (WIN32)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_IMPORT_LIBRARY_SUFFIX})
-endif()

View File

@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 679b4e7..08965d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,7 +187,7 @@ add_subdirectory(apps)
# so that users only need link libpdalcpp.
#
if (APPLE)
- set(PDAL_REEXPORT "-Wl,-reexport_library,$<TARGET_FILE:${PDAL_UTIL_LIB_NAME}>")
+ set(PDAL_REEXPORT "-Wl$<COMMA>-reexport_library$<COMMA>$<TARGET_FILE:${PDAL_UTIL_LIB_NAME}>")
#
# This allows the rpath reference for the reexported library (above) to
# be found.

View File

@@ -0,0 +1,12 @@
diff --git a/apps/pdal.pc.in b/apps/pdal.pc.in
index 6885221..cd2136c 100644
--- a/apps/pdal.pc.in
+++ b/apps/pdal.pc.in
@@ -5,7 +5,6 @@ includedir=@CMAKE_INSTALL_PREFIX@/include
Name: PDAL
Description: Point Data Abstraction Library
-Requires: @PKGCONFIG_LIBRARY_DEFINITIONS@
Version: @PDAL_VERSION@
Libs: -L${libdir} -l@PDAL_LIB_NAME@
Cflags: -I${includedir}/pdal @PDAL_CONFIG_DEFINITIONS@

12
externals/vcpkg/ports/pdal/no-rpath.patch vendored Executable file
View File

@@ -0,0 +1,12 @@
diff --git a/cmake/rpath.cmake b/cmake/rpath.cmake
index ba486b7..4323a77 100644
--- a/cmake/rpath.cmake
+++ b/cmake/rpath.cmake
@@ -1,6 +1,7 @@
#
# Set options and variable related to OSX rpath.
#
+return()
# per http://www.cmake.org/Wiki/CMake_RPATH_handling
SET(CMAKE_SKIP_BUILD_RPATH FALSE)

130
externals/vcpkg/ports/pdal/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,130 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO PDAL/PDAL
REF 2.4.0
SHA512 fd1314058404a1d15e308cee5682dcf3f1c6277884f200069b293b929ddfcd1d0d29bc74353bb08b1d163d3e776c8b036ba62d7c8599470b755128dacfe2f032
HEAD_REF master
PATCHES
fix-dependency.patch
fix-unix-compiler-options.patch
fix-find-library-suffix.patch
no-pkgconfig-requires.patch
no-rpath.patch
)
# Prefer pristine CMake find modules + wrappers and config files from vcpkg.
foreach(package IN ITEMS Curl GeoTIFF ICONV ZSTD)
file(REMOVE "${SOURCE_PATH}/cmake/modules/Find${package}.cmake")
endforeach()
# De-vendoring
file(REMOVE_RECURSE
"${SOURCE_PATH}/vendor/nanoflann"
"${SOURCE_PATH}/vendor/nlohmann"
)
file(INSTALL "${CURRENT_INSTALLED_DIR}/include/nanoflann.hpp" DESTINATION "${SOURCE_PATH}/vendor/nanoflann")
file(INSTALL "${CURRENT_INSTALLED_DIR}/include/nlohmann/json.hpp" DESTINATION "${SOURCE_PATH}/vendor/nlohmann/nlohmann")
file(APPEND "${SOURCE_PATH}/vendor/nlohmann/nlohmann/json.hpp" "namespace NL = nlohmann;\n")
unset(ENV{OSGEO4W_HOME})
if("laszip" IN_LIST FEATURES)
message(WARNING "The 'laszip' feature is obsolete and will be removed in the future.")
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
draco BUILD_PLUGIN_DRACO
e57 BUILD_PLUGIN_E57
hdf5 BUILD_PLUGIN_HDF
i3s BUILD_PLUGIN_I3S
lzma WITH_LZMA
pgpointcloud BUILD_PLUGIN_PGPOINTCLOUD
zstd WITH_ZSTD
)
if(BUILD_PLUGIN_DRACO)
vcpkg_find_acquire_program(PKGCONFIG)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
-DPDAL_PLUGIN_INSTALL_PATH=.
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
-DWITH_TESTS:BOOL=OFF
-DWITH_COMPLETION:BOOL=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_Libexecinfo:BOOL=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Libunwind:BOOL=ON
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/PDAL)
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
# Install and cleanup executables
file(GLOB pdal_unsupported
"${CURRENT_PACKAGES_DIR}/bin/*.bat"
"${CURRENT_PACKAGES_DIR}/bin/pdal-config"
"${CURRENT_PACKAGES_DIR}/debug/bin/*.bat"
"${CURRENT_PACKAGES_DIR}/debug/bin/*.exe"
"${CURRENT_PACKAGES_DIR}/debug/bin/pdal-config"
)
file(REMOVE ${pdal_unsupported})
vcpkg_copy_tools(TOOL_NAMES pdal AUTO_CLEAN)
# Post-install clean-up
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/include/pdal/filters/private/csf"
"${CURRENT_PACKAGES_DIR}/include/pdal/filters/private/miniball"
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(READ "${SOURCE_PATH}/LICENSE.txt" pdal_license)
file(READ "${SOURCE_PATH}/vendor/arbiter/LICENSE" arbiter_license)
file(READ "${SOURCE_PATH}/vendor/kazhdan/PoissonRecon.h" kazhdan_license)
string(REGEX REPLACE "^/\\*\n|\\*/.*\$" "" kazhdan_license "${kazhdan_license}")
file(READ "${SOURCE_PATH}/vendor/lazperf/lazperf.hpp" lazperf_license)
string(REGEX REPLACE "^/\\*\n|\\*/.*\$" "" lazperf_license "${lazperf_license}")
file(READ "${SOURCE_PATH}/vendor/lazperf/detail/field_xyz.hpp" lazperf_detail_license)
string(REGEX REPLACE "^/\\*\n|\\*/.*\$" "" lazperf_detail_license "${lazperf_detail_license}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright"
"${pdal_license}
---
Files in vendor/arbiter/:
${arbiter_license}
---
Files in vendor/kazhdan/:
${kazhdan_license}
---
Files in vendor/lazperf/:
${lazperf_license}
---
Files in vendor/lazperf/detail/:
${lazperf_detail_license}
---
Files in vendor/eigen:
Most Eigen source code is subject to the terms of the Mozilla Public License
v. 2.0. You can obtain a copy the MPL 2.0 at http://mozilla.org/MPL/2.0/.
Some files included in Eigen are under of the following licenses:
- Apache License, Version 2.0
- BSD 3-Clause \"New\" or \"Revised\" License
")

9
externals/vcpkg/ports/pdal/usage vendored Executable file
View File

@@ -0,0 +1,9 @@
The package pdal provides CMake variables:
find_package(PDAL CONFIG REQUIRED)
target_include_directories(${PDAL_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${PDAL_LIBRARIES})
If necessary, override the default plugin search path by setting the
environment variable PDAL_DRIVER_PATH to a list of directories that
pdal should search for plugins.

105
externals/vcpkg/ports/pdal/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,105 @@
{
"name": "pdal",
"version": "2.4.0",
"description": "PDAL - Point Data Abstraction Library is a library for manipulating point cloud data.",
"homepage": "https://pdal.io/",
"license": null,
"supports": "!(windows & staticcrt)",
"dependencies": [
{
"name": "curl",
"default-features": false
},
{
"name": "gdal",
"default-features": false
},
"libgeotiff",
"libxml2",
"nanoflann",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"supported-plugins"
],
"features": {
"draco": {
"description": "Build the Draco plugin",
"dependencies": [
"draco"
]
},
"e57": {
"description": "Build the E57 plugin",
"dependencies": [
"xerces-c"
]
},
"hdf": {
"description": "Build the HDF plugin",
"dependencies": [
{
"name": "hdf5",
"default-features": false
}
]
},
"i3s": {
"description": "Build the SLPK/I3S plugins",
"dependencies": [
"zlib"
]
},
"laszip": {
"description": "Obsolete. PDAL includes LAZperf."
},
"liblzma": {
"description": "Support for compression/decompression with LZMA",
"dependencies": [
"liblzma"
]
},
"pgpointcloud": {
"description": "Build the PgPointCloud plugin",
"dependencies": [
"libpq"
]
},
"supported-plugins": {
"description": "Default set of plugins, dependent on platform",
"dependencies": [
{
"name": "pdal",
"default-features": false,
"features": [
"draco",
"e57",
"i3s"
]
},
{
"name": "pdal",
"default-features": false,
"features": [
"hdf",
"pgpointcloud"
],
"platform": "!uwp"
}
]
},
"zstd": {
"description": "Support for ZSTD compression/decompression",
"dependencies": [
"zstd"
]
}
}
}