[pdal] fix cross build (#33748)

This commit is contained in:
autoantwort 2023-09-18 19:00:59 +02:00 committed by GitHub
parent 5fbb091fcc
commit abc27692f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 3 deletions

View File

@ -0,0 +1,10 @@
diff --git a/dimbuilder/CMakeLists.txt b/dimbuilder/CMakeLists.txt
index 615e2e9..db44505 100644
--- a/dimbuilder/CMakeLists.txt
+++ b/dimbuilder/CMakeLists.txt
@@ -39,3 +39,5 @@ target_link_libraries(dimbuilder
if (MSVC)
target_link_options(dimbuilder PRIVATE /SUBSYSTEM:CONSOLE /ENTRY:mainCRTStartup)
endif(MSVC)
+
+install(TARGETS dimbuilder)

View File

@ -15,6 +15,7 @@ vcpkg_from_github(
fix-gcc-13-build.patch #upstream PR: https://github.com/PDAL/PDAL/pull/4039
gdal-3.7.patch
mingw.patch
install-dimbuilder.patch
)
# Prefer pristine CMake find modules + wrappers and config files from vcpkg.
@ -47,6 +48,11 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
pgpointcloud BUILD_PLUGIN_PGPOINTCLOUD
zstd WITH_ZSTD
)
if(VCPKG_CROSSCOMPILING)
set(DIMBUILDER_EXECUTABLE "-DDIMBUILDER_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pdal/dimbuilder${VCPKG_HOST_EXECUTABLE_SUFFIX}")
endif()
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
@ -59,6 +65,7 @@ vcpkg_cmake_configure(
-DCMAKE_DISABLE_FIND_PACKAGE_Libexecinfo:BOOL=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Libunwind:BOOL=ON
${FEATURE_OPTIONS}
${DIMBUILDER_EXECUTABLE}
MAYBE_UNUSED_VARIABLES
PKG_CONFIG_EXECUTABLE
)
@ -77,7 +84,7 @@ file(GLOB pdal_unsupported
"${CURRENT_PACKAGES_DIR}/debug/bin/pdal-config"
)
file(REMOVE ${pdal_unsupported})
vcpkg_copy_tools(TOOL_NAMES pdal AUTO_CLEAN)
vcpkg_copy_tools(TOOL_NAMES pdal dimbuilder AUTO_CLEAN)
# Post-install clean-up
file(REMOVE_RECURSE

View File

@ -1,7 +1,7 @@
{
"name": "pdal",
"version": "2.5.3",
"port-version": 2,
"port-version": 3,
"description": "PDAL - Point Data Abstraction Library is a library for manipulating point cloud data.",
"homepage": "https://pdal.io/",
"license": null,
@ -24,6 +24,11 @@
},
"nanoflann",
"nlohmann-json",
{
"name": "pdal",
"host": true,
"default-features": false
},
{
"name": "vcpkg-cmake",
"host": true

View File

@ -6322,7 +6322,7 @@
},
"pdal": {
"baseline": "2.5.3",
"port-version": 2
"port-version": 3
},
"pdal-c": {
"baseline": "2.2.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "91391b35fb1af3810e79110564bcf6e668dd9194",
"version": "2.5.3",
"port-version": 3
},
{
"git-tree": "59463f5cf4dccd2c2167abad2e290413cdc91d22",
"version": "2.5.3",