2022-07-12 00:52:46 +02:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
2019-07-23 08:43:10 +08:00
|
|
|
set(VERSION 1.8.1)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-05-13 20:26:05 +03:00
|
|
|
URLS "http://download.osgeo.org/liblas/libLAS-${VERSION}.tar.bz2"
|
|
|
|
FILENAME "libLAS-${VERSION}-src.tar.bz2"
|
2019-07-23 08:43:10 +08:00
|
|
|
SHA512 1cb39c557af0006c54f1100d0d409977fcc1886abd155c1b144d806c47f8675a9f2125d3a9aca16bae65d2aabba84d5e5e322b42085e7db312f3d53f92342acf
|
2020-05-13 20:26:05 +03:00
|
|
|
HEAD_REF master
|
2019-07-23 08:43:10 +08:00
|
|
|
)
|
|
|
|
|
2023-04-13 18:13:15 +02:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2022-07-12 00:52:46 +02:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2020-05-13 20:26:05 +03:00
|
|
|
PATCHES
|
|
|
|
fix-boost-headers.patch
|
2022-07-12 00:52:46 +02:00
|
|
|
fix-cmake-config.patch
|
2023-05-04 19:44:24 +02:00
|
|
|
fix-crosscompiling.diff
|
2022-07-12 00:52:46 +02:00
|
|
|
misc-fixes.patch
|
2023-05-04 19:44:24 +02:00
|
|
|
remove_unnecessary_boost_dependency.diff
|
2019-07-23 08:43:10 +08:00
|
|
|
)
|
|
|
|
|
2022-07-12 00:52:46 +02:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/modules")
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tools WITH_UTILITIES
|
|
|
|
)
|
2019-07-23 08:43:10 +08:00
|
|
|
|
2022-07-12 00:52:46 +02:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DBUILD_OSGEO4W=OFF
|
2020-05-13 20:26:05 +03:00
|
|
|
-DWITH_TESTS=OFF
|
2022-07-12 00:52:46 +02:00
|
|
|
OPTIONS_DEBUG
|
2020-05-13 20:26:05 +03:00
|
|
|
-DWITH_UTILITIES=OFF
|
2019-07-23 08:43:10 +08:00
|
|
|
)
|
|
|
|
|
2022-07-12 00:52:46 +02:00
|
|
|
vcpkg_cmake_install()
|
2019-07-23 08:43:10 +08:00
|
|
|
|
2020-10-14 05:38:05 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
2022-07-12 00:52:46 +02:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
2020-10-14 05:38:05 +08:00
|
|
|
else()
|
2022-07-12 00:52:46 +02:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/libLAS)
|
2020-10-14 05:38:05 +08:00
|
|
|
endif()
|
2019-07-23 08:43:10 +08:00
|
|
|
|
2023-02-01 03:09:59 +01:00
|
|
|
vcpkg_replace_string ("${CURRENT_PACKAGES_DIR}/share/liblas/liblas-config.cmake" "_DIR}/.." "_DIR}/../..")
|
2023-05-04 19:44:24 +02:00
|
|
|
vcpkg_replace_string ("${CURRENT_PACKAGES_DIR}/share/liblas/liblas-config.cmake" "\${PROJECT_ROOT_DIR}/lib" "\${PROJECT_ROOT_DIR}/$<$<CONFIG:DEBUG>:/debug>/lib")
|
|
|
|
vcpkg_replace_string ("${CURRENT_PACKAGES_DIR}/share/liblas/liblas-config.cmake" "\${PROJECT_ROOT_DIR}/bin" "\${PROJECT_ROOT_DIR}/tools/${PORT}")
|
2023-02-01 03:09:59 +01:00
|
|
|
|
2022-07-12 00:52:46 +02:00
|
|
|
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()
|
2019-07-23 08:43:10 +08:00
|
|
|
|
2022-07-12 00:52:46 +02:00
|
|
|
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)
|