Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/liblas/fix-cmake-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cmake/liblas-config.cmake.in b/cmake/liblas-config.cmake.in
index 175e997..8a55804 100644
--- a/cmake/liblas-config.cmake.in
+++ b/cmake/liblas-config.cmake.in
@@ -19,6 +19,8 @@ set (libLAS_INCLUDE_DIRS "${PROJECT_ROOT_DIR}/include")
set (libLAS_LIBRARY_DIRS "${PROJECT_ROOT_DIR}/lib")
set (libLAS_BINARY_DIRS "${PROJECT_ROOT_DIR}/bin")

+include(CMakeFindDependencyMacro)
+find_dependency(GeoTIFF CONFIG)
include ("${_DIR}/liblas-depends.cmake")
if(WIN32)
set (libLAS_LIBRARIES liblas liblas_c)
59 changes: 59 additions & 0 deletions ports/liblas/misc-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d246a88..3da2106 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,7 @@
#
###############################################################################
# libLAS general settings
+cmake_minimum_required(VERSION 3.7.0)
project(libLAS)


@@ -64,7 +65,6 @@ set(WITH_ENDIANAWARE FALSE CACHE BOOL "Choose whether or not libLAS should do ru

###############################################################################
# CMake settings
-cmake_minimum_required(VERSION 2.6.0)

set(CMAKE_COLOR_MAKEFILE ON)

@@ -107,7 +107,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})

file(READ "doc/index.txt" README )
-file(WRITE "README.txt" "${README}")

###############################################################################
# Platform and compiler specific settings
@@ -138,8 +137,6 @@ if(WIN32)

endif()

- set(CMAKE_INCLUDE_PATH c:/osgeo4w64/include;$ENV{CMAKE_INCLUDE_PATH})
- set(CMAKE_LIBRARY_PATH c:/osgeo4w64/lib;$ENV{CMAKE_LIBRARY_PATH})
else()

# Recommended C++ compilation flags
@@ -337,8 +334,6 @@ set(LIBLAS_DATA_DIR ${LIBLAS_DATA_SUBDIR})
###############################################################################
# Installation commands

-install(FILES AUTHORS COPYING INSTALL LICENSE.txt README.txt
- DESTINATION ${LIBLAS_DATA_DIR}/doc)

###############################################################################
# Processing of project directories
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
index beb83e2..e328c95 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -160,7 +160,7 @@ install(TARGETS ${LIBLAS_UTILITIES}
ARCHIVE DESTINATION ${LIBLAS_LIB_DIR})


-if(UNIX)
+if(0)

set(LIBLAS_UTILS_RPATH ${CMAKE_INSTALL_PREFIX}/lib ${Boost_LIBRARY_DIRS})
if(LASZIP_FOUND)
59 changes: 34 additions & 25 deletions ports/liblas/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

set(VERSION 1.8.1)

vcpkg_download_distfile(ARCHIVE
Expand All @@ -8,44 +10,51 @@ vcpkg_download_distfile(ARCHIVE
)

vcpkg_extract_source_archive_ex(
ARCHIVE ${ARCHIVE}
ARCHIVE "${ARCHIVE}"
OUT_SOURCE_PATH SOURCE_PATH
PATCHES
fix-boost-headers.patch
fix-cmake-config.patch
misc-fixes.patch
)

file(REMOVE ${SOURCE_PATH}/cmake/modules/FindPROJ4.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindGeoTIFF.cmake)
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules")

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools WITH_UTILITIES
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_OSGEO4W=OFF # Disable osgeo4w
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_OSGEO4W=OFF
-DWITH_TESTS=OFF
OPTIONS_DEBUG
-DWITH_UTILITIES=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB}
-DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${CMAKE_DISABLE_FIND_PACKAGE_JPEG}
)

vcpkg_install_cmake()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)

if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/cmake/libLAS/liblas-depends.cmake)
vcpkg_cmake_install()

if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libLAS)
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/libLAS)
endif()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)

if(WITH_UTILITIES)
set(tools lasinfo lasblock las2las las2txt txt2las ts2las)
if(NOT WIN32)
list(APPEND tools las2col las2pg)
endif()
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
endif()

file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
9 changes: 9 additions & 0 deletions ports/liblas/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
liblas provides CMake targets:

# C API
find_package(libLAS CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<$<PLATFORM_ID:Windows>:lib>las_c)

# C++ API
find_package(libLAS CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<$<PLATFORM_ID:Windows>:lib>las)
27 changes: 17 additions & 10 deletions ports/liblas/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "liblas",
"version": "1.8.1",
"port-version": 9,
"port-version": 10,
"description": "A C/C++ library for reading and writing the very common LAS LiDAR format.",
"license": null,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"supports": "!arm & !staticcrt",
"dependencies": [
"boost-detail",
"boost-filesystem",
Expand All @@ -14,20 +16,25 @@
"boost-system",
"boost-thread",
"boost-uuid",
"libgeotiff"
"libgeotiff",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"jpeg": {
"description": "Support for jpeg",
"dependencies": [
"libjpeg-turbo"
]
"description": "This feature does nothing. It is retained for compatibility."
},
"tools": {
"description": "Build utilities."
},
"zlib": {
"description": "Support zlib for compression",
"dependencies": [
"zlib"
]
"description": "This feature does nothing. It is retained for compatibility."
}
}
}
1 change: 0 additions & 1 deletion scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ libigl:x64-uwp=fail
libirecovery:x64-windows-static-md=fail
# 120 min build time for libjxl arm-uwp-rel, reason unknown
libjxl:arm-uwp=skip
liblas:arm64-windows=fail
liblemon:arm-uwp=fail
liblemon:x64-uwp=fail
liblo:arm-uwp=fail
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3754,7 +3754,7 @@
},
"liblas": {
"baseline": "1.8.1",
"port-version": 9
"port-version": 10
},
"liblbfgs": {
"baseline": "1.10",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/liblas.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "59d85ba2350ba688af5aad5a538382fd7b2963e3",
"version": "1.8.1",
"port-version": 10
},
{
"git-tree": "9d89f6e4515fcd144d24a7e619ea2de26799a005",
"version": "1.8.1",
Expand Down