2022-10-26 01:24:48 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
2017-07-26 01:25:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libkml/libkml
|
2023-02-11 03:33:17 +08:00
|
|
|
REF "${VERSION}"
|
2017-07-26 01:25:17 +08:00
|
|
|
SHA512 aa48158103d3af764bf98c1fb4cf3e1356b9cc6c8e79d80b96850916f0a8ccb1dac3a46427735dd0bf20647daa047d10e722ac3da2a214d4c1559bf6d5d7c853
|
|
|
|
HEAD_REF master
|
2017-07-29 07:54:57 +08:00
|
|
|
PATCHES
|
2019-10-08 01:35:13 +08:00
|
|
|
patch_empty_literal_on_vc.patch
|
2022-10-26 01:24:48 +08:00
|
|
|
fix-mingw.patch
|
|
|
|
fix-minizip.patch
|
2023-02-11 03:33:17 +08:00
|
|
|
add-target-include-directories.patch
|
2017-07-29 07:54:57 +08:00
|
|
|
)
|
|
|
|
|
2022-10-26 01:24:48 +08:00
|
|
|
file(REMOVE
|
|
|
|
"${SOURCE_PATH}/cmake/External_boost.cmake"
|
|
|
|
"${SOURCE_PATH}/cmake/External_expat.cmake"
|
|
|
|
"${SOURCE_PATH}/cmake/External_minizip.cmake"
|
|
|
|
"${SOURCE_PATH}/cmake/External_uriparser.cmake"
|
|
|
|
"${SOURCE_PATH}/cmake/External_zlib.cmake"
|
|
|
|
"${SOURCE_PATH}/src/kml/base/contrib/minizip/ioapi.h"
|
|
|
|
)
|
2017-07-29 07:54:57 +08:00
|
|
|
|
2022-10-26 01:24:48 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-01-17 04:45:42 +08:00
|
|
|
OPTIONS
|
|
|
|
-DCMAKE_POLICY_DEFAULT_CMP0022=NEW
|
2023-03-31 05:13:25 +08:00
|
|
|
# libkml uses std::unary_function that was deprecated in C++11 and removed in C++17
|
|
|
|
# compilers are starting to ship C++17 as the defualt so explicitly set C++11
|
|
|
|
-DCMAKE_CXX_STANDARD=11
|
2017-07-26 01:25:17 +08:00
|
|
|
)
|
|
|
|
|
2022-10-26 01:24:48 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-07-26 01:25:17 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-10-26 01:24:48 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
|
|
|
else()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libkml)
|
2019-07-11 08:03:41 +08:00
|
|
|
endif()
|
|
|
|
|
2022-10-26 01:24:48 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2023-02-11 03:33:17 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|