[laszip] update to 3.5.0 (#48774)

This commit is contained in:
toge
2026-01-01 01:11:13 +09:00
committed by GitHub
parent ed202616ed
commit d8e5d78fee
7 changed files with 77 additions and 44 deletions

View File

@@ -1,3 +1,33 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12db977..78e373f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,12 +6,6 @@ string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
set(ROOT_DIR "${PROJECT_SOURCE_DIR}")
-if (MSVC)
- add_compile_options("/std:c++17")
-else()
- add_compile_options(-std=c++17)
-endif()
-
if(CMAKE_GNU_COMPILER_ID OR CMAKE_Clang_COMPILER_ID)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format-security -Wno-format-truncation")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-security -Wno-format-truncation -std=c++17")
diff --git a/cmake/macros.cmake b/cmake/macros.cmake
index cd23260..a687a61 100644
--- a/cmake/macros.cmake
+++ b/cmake/macros.cmake
@@ -64,7 +64,7 @@ macro(LASZIP_ADD_LIBRARY _name)
CLEAN_DIRECT_OUTPUT 1
FOLDER Libraries
)
- set_property(TARGET ${_name} PROPERTY CXX_STANDARD 11)
+ set_property(TARGET ${_name} PROPERTY CXX_STANDARD 17)
install(TARGETS ${_name}
EXPORT LASZIPTargets
diff --git a/cmake/unix_compiler_options.cmake b/cmake/unix_compiler_options.cmake
index 0a6550f..65a9f4c 100644
--- a/cmake/unix_compiler_options.cmake

View File

@@ -1,15 +0,0 @@
diff --git a/src/lasmessage.cpp b/src/lasmessage.cpp
index c39d13a..a1e2d0d 100644
--- a/src/lasmessage.cpp
+++ b/src/lasmessage.cpp
@@ -139,8 +139,8 @@ void las_default_message_handler(LAS_MESSAGE_TYPE type, const char* msg, void* u
if (!prefix.empty())
{
format_message(message, (unsigned)prefix.size());
- fprintf(stderr, prefix.c_str());
- fprintf(stderr, message.c_str());
+ fprintf(stderr, "%s", prefix.c_str());
+ fprintf(stderr, "%s", message.c_str());
}
else
{

View File

@@ -0,0 +1,12 @@
diff --git a/src/mydefs.cpp b/src/mydefs.cpp
index ab9f3bf..722272d 100644
--- a/src/mydefs.cpp
+++ b/src/mydefs.cpp
@@ -37,6 +37,7 @@
#include <cmath>
#include <cstdarg>
#include <cstring>
+#include <cstdint>
#include <filesystem>
#include <string>
#include <stdio.h>

View File

@@ -1,27 +1,27 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO LASzip/LASzip
REF ${VERSION}
SHA512 163204a4d0bb4b4371a1a63eb8ba9477dc504d7e171ec3d75c3120ace7ab682df517b4583efd951c8c7ac1be03bde8c8c327586e36c8884cbf7e98ec1e1c27bf
HEAD_REF master
PATCHES
compiler-options.diff
format-string.diff
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LASZIP_BUILD_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DLASZIP_BUILD_STATIC=${LASZIP_BUILD_STATIC}
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Remove laszip_api3 dll since it doesn't export functions properly during build.
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO LASzip/LASzip
REF ${VERSION}
SHA512 6cdc38249ace8191dae454817fe5f5a3cd22b24c7065daa0e4a3eaaca4d698540c56affa06e15de88aea2912a82033d1dc93f5d3904190a896edf1204af865f5
HEAD_REF master
PATCHES
compiler-options.diff
include-cstdint.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LASZIP_BUILD_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DLASZIP_BUILD_STATIC=${LASZIP_BUILD_STATIC}
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Remove laszip_api3 dll since it doesn't export functions properly during build.
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.txt")

View File

@@ -1,9 +1,10 @@
{
"name": "laszip",
"version": "3.4.4",
"version": "3.5.0",
"description": "LASzip - free and lossless LiDAR compression",
"homepage": "https://laszip.org/",
"license": "Apache-2.0",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@@ -4465,7 +4465,7 @@
"port-version": 0
},
"laszip": {
"baseline": "3.4.4",
"baseline": "3.5.0",
"port-version": 0
},
"launch-darkly-server": {

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2fdfbcdcbd5c1c0adef37ef34b1be173a7bb84c3",
"version": "3.5.0",
"port-version": 0
},
{
"git-tree": "775e13e090dcbf53186bfce9ddaf3a9f62afdf66",
"version": "3.4.4",