2023-10-31 20:01:51 +01:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2022-03-12 01:57:37 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2021-07-22 15:11:30 -07:00
|
|
|
|
2023-10-31 20:01:51 +01:00
|
|
|
# Convert PcapPlusPlus to add leading zero 23.9 => 23.09
|
|
|
|
string(REGEX REPLACE "^([0-9]+)[.]([0-9])\$" "\\1.0\\2" PCAPPLUSPLUS_VERSION "${VERSION}")
|
|
|
|
|
2021-07-22 15:11:30 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO seladb/PcapPlusPlus
|
2023-10-31 20:01:51 +01:00
|
|
|
REF "v${PCAPPLUSPLUS_VERSION}"
|
2024-09-20 22:18:49 +01:00
|
|
|
SHA512 ae68a61a41915b1272aa7f8d1b70889216ea50e966c594d408d79fbca2667ff5aa073fe21a72c7e0916f744a925ac1e85e1d1f02e458b3f289201b88c8101fa3
|
2021-07-22 15:11:30 -07:00
|
|
|
HEAD_REF master
|
2024-08-27 16:29:57 +08:00
|
|
|
PATCHES
|
|
|
|
0001-warn-STL4043-for-v23.09.patch # just workaround, which has been fixed on mainline
|
2021-07-22 15:11:30 -07:00
|
|
|
)
|
|
|
|
|
2022-03-12 01:57:37 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-10-31 20:01:51 +01:00
|
|
|
OPTIONS
|
|
|
|
-DPCAPPP_BUILD_EXAMPLES=OFF
|
2022-03-12 01:57:37 +08:00
|
|
|
)
|
2021-07-22 15:11:30 -07:00
|
|
|
|
2022-03-12 01:57:37 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-10-31 20:01:51 +01:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/pcapplusplus)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2022-03-12 01:57:37 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-07-22 15:11:30 -07:00
|
|
|
|
2023-10-31 20:01:51 +01:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
)
|
2021-07-22 15:11:30 -07:00
|
|
|
|
2023-10-31 20:01:51 +01:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|