2023-08-24 12:55:34 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2022-12-01 03:03:11 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO nodejs/llhttp
|
2023-09-26 15:04:07 +08:00
|
|
|
REF refs/tags/release/v${VERSION}
|
2024-09-24 03:23:35 +08:00
|
|
|
SHA512 7e6f5427b4b6d778ecefff892db78894ef4fd22a79e9c1f2c24d38d603d885755bdc8b0e8202b47c8bc209d3caf45a7293214617390a7a9c33bffbaab59fe5da
|
2023-08-24 12:55:34 +08:00
|
|
|
PATCHES
|
|
|
|
fix-usage.patch
|
2022-12-01 03:03:11 +08:00
|
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LLHTTP_BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LLHTTP_BUILD_SHARED)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_SHARED_LIBS=${LLHTTP_BUILD_SHARED}
|
|
|
|
-DBUILD_STATIC_LIBS=${LLHTTP_BUILD_STATIC}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
CONFIG_PATH "/lib/cmake/${PORT}"
|
|
|
|
)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE-MIT")
|
2022-12-07 04:49:03 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|