2023-11-01 03:01:51 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2022-03-12 01:57:37 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2021-07-23 06:11:30 +08:00
|
|
|
|
2023-11-01 03:01:51 +08: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-23 06:11:30 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO seladb/PcapPlusPlus
|
2023-11-01 03:01:51 +08:00
|
|
|
REF "v${PCAPPLUSPLUS_VERSION}"
|
|
|
|
SHA512 e7dc1dbd85c9f0d2f9c5d3e436456c2cd183fb508c869fa8fb83f46aac99b868a16283204e5d57a0bfd7587f6ac2582b3e14c6098683fad4501708c8fededd6a
|
2021-07-23 06:11:30 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2022-03-12 01:57:37 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-11-01 03:01:51 +08:00
|
|
|
OPTIONS
|
|
|
|
-DPCAPPP_BUILD_EXAMPLES=OFF
|
2022-03-12 01:57:37 +08:00
|
|
|
)
|
2021-07-23 06:11:30 +08:00
|
|
|
|
2022-03-12 01:57:37 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-11-01 03:01:51 +08: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-23 06:11:30 +08:00
|
|
|
|
2023-11-01 03:01:51 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
)
|
2021-07-23 06:11:30 +08:00
|
|
|
|
2023-11-01 03:01:51 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|