2021-07-26 03:48:56 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH QUIC_SOURCE_PATH
|
|
|
|
REPO microsoft/msquic
|
2024-06-19 02:58:24 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 5937fbc2f287567d590fc0afc947459359e5413fa25f2f193434ad6d7016f7cb0dede4e2ef5e1e4e8b21b556c5ad8ce4cb612514403bb593a49af0fb42d1cb15
|
2021-07-26 03:48:56 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2024-06-26 02:02:38 +08:00
|
|
|
fix-install.patch # Adjust install path of build outputs
|
|
|
|
fix-uwp-crt.patch # https://github.com/microsoft/msquic/pull/4373
|
|
|
|
fix-comparing-system-processor-with-win32.patch # https://github.com/microsoft/msquic/pull/4374
|
2021-07-26 03:48:56 +08:00
|
|
|
)
|
|
|
|
|
2024-06-26 02:02:38 +08:00
|
|
|
# This avoids a link error on x86-windows:
|
|
|
|
# LINK : fatal error LNK1268: inconsistent option 'NODEFAULTLIB:libucrt.lib' specified with /USEPROFILE but not with /GENPROFILE
|
|
|
|
file(REMOVE "${QUIC_SOURCE_PATH}/src/bin/winuser/pgo_x86/msquic.pgd")
|
|
|
|
|
2021-07-26 03:48:56 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH OPENSSL_SOURCE_PATH
|
|
|
|
REPO quictls/openssl
|
2024-06-19 02:58:24 +08:00
|
|
|
REF 612d8e44d687e4b71c4724319d7aa27a733bcbca
|
|
|
|
SHA512 ff487d882c2b70ed8915a88ecf0a64724435a96187a7bb3bf401f4a2c4dc572a93f7e788040ccbd29da8bc6ac49ee11550c9d56153262c05fae173ac1d242baa
|
|
|
|
HEAD_REF openssl-3.1.5+quic
|
2021-07-26 03:48:56 +08:00
|
|
|
)
|
2024-06-26 02:02:38 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${QUIC_SOURCE_PATH}/submodules/openssl")
|
|
|
|
file(RENAME "${OPENSSL_SOURCE_PATH}" "${QUIC_SOURCE_PATH}/submodules/openssl")
|
|
|
|
|
2024-06-19 02:58:24 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH XDP_WINDOWS
|
|
|
|
REPO microsoft/xdp-for-windows
|
|
|
|
REF ce228a986fd30049ed58f569d2bf20efffc250f3
|
|
|
|
SHA512 4a26c5defe422ef42308d72cf8d1cab1c172ce5a10d8d830c446cb7dd93f0c41f35f3cbbfeceb687d5135272006dd1b1bc4c2089ace4866cede81d5c76206af7
|
2024-06-26 02:02:38 +08:00
|
|
|
HEAD_REF main
|
2024-06-19 02:58:24 +08:00
|
|
|
)
|
2024-06-26 02:02:38 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${QUIC_SOURCE_PATH}/submodules/xdp-for-windows")
|
|
|
|
file(RENAME "${XDP_WINDOWS}" "${QUIC_SOURCE_PATH}/submodules/xdp-for-windows")
|
2021-07-26 03:48:56 +08:00
|
|
|
|
|
|
|
vcpkg_find_acquire_program(PERL)
|
2024-06-26 02:02:38 +08:00
|
|
|
get_filename_component(PERL_EXE_PATH "${PERL}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
2021-07-26 03:48:56 +08:00
|
|
|
|
|
|
|
if(NOT VCPKG_HOST_IS_WINDOWS)
|
|
|
|
find_program(MAKE make)
|
2024-06-26 02:02:38 +08:00
|
|
|
get_filename_component(MAKE_EXE_PATH "${MAKE}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path(PREPEND "${MAKE_EXE_PATH}")
|
2021-07-26 03:48:56 +08:00
|
|
|
endif()
|
|
|
|
|
2024-06-27 12:37:24 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_find_acquire_program(NASM)
|
|
|
|
get_filename_component(NASM_EXE_PATH "${NASM}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}")
|
|
|
|
endif()
|
2021-07-26 03:48:56 +08:00
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
2024-06-26 02:02:38 +08:00
|
|
|
SOURCE_PATH "${QUIC_SOURCE_PATH}"
|
2021-07-26 03:48:56 +08:00
|
|
|
OPTIONS
|
|
|
|
-DQUIC_SOURCE_LINK=OFF
|
|
|
|
-DQUIC_TLS=openssl
|
|
|
|
-DQUIC_USE_SYSTEM_LIBCRYPTO=OFF
|
|
|
|
-DQUIC_BUILD_PERF=OFF
|
|
|
|
-DQUIC_BUILD_TEST=OFF
|
2024-06-26 02:02:38 +08:00
|
|
|
"-DQUIC_STATIC_LINK_CRT=${STATIC_CRT}"
|
|
|
|
"-DQUIC_UWP_BUILD=${VCPKG_TARGET_IS_UWP}"
|
2021-07-26 03:48:56 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
2024-06-19 02:58:24 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${QUIC_SOURCE_PATH}/LICENSE")
|
2024-06-26 02:02:38 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
2021-07-26 03:48:56 +08:00
|
|
|
)
|