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}"
|
2024-09-05 13:30:48 +08:00
|
|
|
SHA512 9025520d5a4cf1f2046959942fa83f73e49e836dcd20a0dde34bd34cbe071c9ffd5b195a13ab77a6a85d71ae91baa839b12a7f1fc27fcb79660561a2a07b6013
|
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
|
2024-09-04 04:23:39 +08:00
|
|
|
all_headers.patch
|
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-09-13 03:20:52 +08:00
|
|
|
-DCMAKE_DEBUG_POSTFIX=d
|
2024-06-26 02:02:38 +08:00
|
|
|
"-DQUIC_STATIC_LINK_CRT=${STATIC_CRT}"
|
2024-09-04 03:24:56 +08:00
|
|
|
"-DQUIC_STATIC_LINK_PARTIAL_CRT=${STATIC_CRT}"
|
2024-06-26 02:02:38 +08:00
|
|
|
"-DQUIC_UWP_BUILD=${VCPKG_TARGET_IS_UWP}"
|
2021-07-26 03:48:56 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
2024-09-13 03:20:52 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2021-07-26 03:48:56 +08:00
|
|
|
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
|
|
|
)
|