2021-07-26 04:48:56 +09:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH QUIC_SOURCE_PATH
|
|
|
|
REPO microsoft/msquic
|
2024-06-18 18:58:24 +00:00
|
|
|
REF "v${VERSION}"
|
2024-09-27 18:38:00 +03:00
|
|
|
SHA512 87bb96bc77c30a39e419be2592199de8f9fa74179852637d2902c50d555bad24d2a664b888434fbc1df461ece69a52097634a47f0edbb78b0b0eed6e5a94033f
|
2021-07-26 04:48:56 +09:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2024-06-25 11:02:38 -07: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-03 23:23:39 +03:00
|
|
|
all_headers.patch
|
2021-07-26 04:48:56 +09:00
|
|
|
)
|
|
|
|
|
2024-06-25 11:02:38 -07: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 04:48:56 +09:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH OPENSSL_SOURCE_PATH
|
|
|
|
REPO quictls/openssl
|
2024-06-18 18:58:24 +00:00
|
|
|
REF 612d8e44d687e4b71c4724319d7aa27a733bcbca
|
|
|
|
SHA512 ff487d882c2b70ed8915a88ecf0a64724435a96187a7bb3bf401f4a2c4dc572a93f7e788040ccbd29da8bc6ac49ee11550c9d56153262c05fae173ac1d242baa
|
|
|
|
HEAD_REF openssl-3.1.5+quic
|
2021-07-26 04:48:56 +09:00
|
|
|
)
|
2024-06-25 11:02:38 -07:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${QUIC_SOURCE_PATH}/submodules/openssl")
|
|
|
|
file(RENAME "${OPENSSL_SOURCE_PATH}" "${QUIC_SOURCE_PATH}/submodules/openssl")
|
|
|
|
|
2024-06-18 18:58:24 +00:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH XDP_WINDOWS
|
|
|
|
REPO microsoft/xdp-for-windows
|
|
|
|
REF ce228a986fd30049ed58f569d2bf20efffc250f3
|
|
|
|
SHA512 4a26c5defe422ef42308d72cf8d1cab1c172ce5a10d8d830c446cb7dd93f0c41f35f3cbbfeceb687d5135272006dd1b1bc4c2089ace4866cede81d5c76206af7
|
2024-06-25 11:02:38 -07:00
|
|
|
HEAD_REF main
|
2024-06-18 18:58:24 +00:00
|
|
|
)
|
2024-06-25 11:02:38 -07: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 04:48:56 +09:00
|
|
|
|
|
|
|
vcpkg_find_acquire_program(PERL)
|
2024-06-25 11:02:38 -07:00
|
|
|
get_filename_component(PERL_EXE_PATH "${PERL}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
2021-07-26 04:48:56 +09:00
|
|
|
|
|
|
|
if(NOT VCPKG_HOST_IS_WINDOWS)
|
|
|
|
find_program(MAKE make)
|
2024-06-25 11:02:38 -07:00
|
|
|
get_filename_component(MAKE_EXE_PATH "${MAKE}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path(PREPEND "${MAKE_EXE_PATH}")
|
2021-07-26 04:48:56 +09:00
|
|
|
endif()
|
|
|
|
|
2024-06-26 21:37:24 -07: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 04:48:56 +09:00
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
2024-06-25 11:02:38 -07:00
|
|
|
SOURCE_PATH "${QUIC_SOURCE_PATH}"
|
2021-07-26 04:48:56 +09:00
|
|
|
OPTIONS
|
|
|
|
-DQUIC_SOURCE_LINK=OFF
|
|
|
|
-DQUIC_TLS=openssl
|
|
|
|
-DQUIC_USE_SYSTEM_LIBCRYPTO=OFF
|
|
|
|
-DQUIC_BUILD_PERF=OFF
|
|
|
|
-DQUIC_BUILD_TEST=OFF
|
2024-06-25 11:02:38 -07:00
|
|
|
"-DQUIC_STATIC_LINK_CRT=${STATIC_CRT}"
|
2024-09-03 19:24:56 +00:00
|
|
|
"-DQUIC_STATIC_LINK_PARTIAL_CRT=${STATIC_CRT}"
|
2024-06-25 11:02:38 -07:00
|
|
|
"-DQUIC_UWP_BUILD=${VCPKG_TARGET_IS_UWP}"
|
2021-07-26 04:48:56 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
2024-09-12 19:20:52 +00:00
|
|
|
vcpkg_cmake_config_fixup()
|
2021-07-26 04:48:56 +09:00
|
|
|
vcpkg_copy_pdbs()
|
2024-06-18 18:58:24 +00:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${QUIC_SOURCE_PATH}/LICENSE")
|
2024-06-25 11:02:38 -07:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
2021-07-26 04:48:56 +09:00
|
|
|
)
|