2022-12-02 19:23:59 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ngtcp2/ngtcp2
|
2023-03-07 04:09:55 +08:00
|
|
|
REF "v${VERSION}"
|
2024-09-03 22:40:37 +03:00
|
|
|
SHA512 891a7339122f60b1796bb24d29ab75d0316717c2a64a45bade805242b70cb8713abc7642cdf0ec646ab9e80085d65117f0ea9b1e671d76bcd54038b0ea9bc868
|
2024-05-16 08:07:20 +02:00
|
|
|
HEAD_REF main
|
2022-12-02 19:23:59 +02:00
|
|
|
PATCHES
|
2024-09-16 17:40:40 -07:00
|
|
|
openssl_required.patch
|
|
|
|
popcnt_intrinsic.patch # https://github.com/ngtcp2/ngtcp2/pull/1351
|
2022-12-02 19:23:59 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIB)
|
|
|
|
|
2024-07-24 20:25:53 +03:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2024-09-16 17:40:40 -07:00
|
|
|
wolfssl ENABLE_WOLFSSL
|
|
|
|
gnutls ENABLE_GNUTLS
|
|
|
|
libressl ENABLE_OPENSSL
|
2024-07-24 20:25:53 +03:00
|
|
|
)
|
|
|
|
|
2022-12-02 19:23:59 +02:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2024-07-24 20:25:53 +03:00
|
|
|
${FEATURE_OPTIONS}
|
2022-12-02 19:23:59 +02:00
|
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
2024-05-16 08:07:20 +02:00
|
|
|
-DBUILD_TESTING=OFF
|
2023-03-07 04:09:55 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libev=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON
|
2023-04-25 03:34:17 +02:00
|
|
|
-DCMAKE_INSTALL_DOCDIR=share/ngtcp2
|
2022-12-02 19:23:59 +02:00
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2024-09-03 22:40:37 +03:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/ngtcp2")
|
2022-12-02 19:23:59 +02:00
|
|
|
|
2023-04-25 03:34:17 +02:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
2022-12-02 19:23:59 +02:00
|
|
|
|
2023-03-07 04:09:55 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|