2022-12-03 01:23:59 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ngtcp2/ngtcp2
|
2023-03-07 04:09:55 +08:00
|
|
|
REF "v${VERSION}"
|
2023-06-08 03:11:55 +08:00
|
|
|
SHA512 59fd3b1dacd34d6945acb4b2f4d7e9ea4b62496f4b834d24e4f3d5366a73976c26420baaab87de48cba0fcb64a9c18634ead7b2f839ac4687b4b066f58b938f6
|
2022-12-03 01:23:59 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
export-unofficical-target.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIB)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
2023-04-25 09:34:17 +08:00
|
|
|
-DENABLE_OPENSSL=OFF
|
2023-03-07 04:09:55 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libev=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CUnit=ON
|
2023-04-25 09:34:17 +08:00
|
|
|
-DCMAKE_INSTALL_DOCDIR=share/ngtcp2
|
2022-12-03 01:23:59 +08:00
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2023-04-25 09:34:17 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-ngtcp2)
|
2022-12-03 01:23:59 +08:00
|
|
|
|
2023-04-25 09:34:17 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
2022-12-03 01:23:59 +08:00
|
|
|
|
2023-04-25 09:34:17 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-03-07 04:09:55 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|