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-10-01 05:02:24 +08:00
|
|
|
SHA512 51afee7e28a7d6ae1b5491edd635e0c88a92a00bacedeaac632a0f19762e9940c9b819a9d33072d3553c004acd4ec0cdf645301f712b408498053de065b2b1cf
|
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-10-01 05:02:24 +08:00
|
|
|
REF openssl-3.1.7-quic1
|
|
|
|
SHA512 230f48a4ef20bfd492b512bd53816a7129d70849afc1426e9ce813273c01884d5474552ecaede05231ca354403f25e2325c972c9c7950ae66dae310800bd19e7
|
|
|
|
HEAD_REF openssl-3.1.7+quic
|
2021-07-26 03:48:56 +08:00
|
|
|
)
|
2024-06-26 02:02:38 +08:00
|
|
|
|
2024-10-01 05:02:24 +08:00
|
|
|
file(REMOVE_RECURSE "${QUIC_SOURCE_PATH}/submodules/openssl3")
|
|
|
|
file(RENAME "${OPENSSL_SOURCE_PATH}" "${QUIC_SOURCE_PATH}/submodules/openssl3")
|
2024-06-26 02:02:38 +08:00
|
|
|
|
2024-06-19 02:58:24 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH XDP_WINDOWS
|
|
|
|
REPO microsoft/xdp-for-windows
|
2024-10-02 22:24:08 +08:00
|
|
|
REF v1.0.2
|
|
|
|
SHA512 1b26487fa79c8796d4b0d5e09f4fc9acb003d8e079189ec57a36ff03c9c2620829106fdbc4780e298872826f3a97f034d40e04d00a77ded97122874d13bfb145
|
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
|
2024-10-01 05:02:24 +08:00
|
|
|
-DQUIC_TLS=openssl3
|
2021-07-26 03:48:56 +08:00
|
|
|
-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}"
|
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
|
|
|
)
|