Skip to content

Commit

Permalink
Ports:
Browse files Browse the repository at this point in the history
- Update msquic to 3.4.7
- Update msh3 to 0.7.0
  • Loading branch information
talregev committed Dec 12, 2024
1 parent a345bbd commit 75f7b1a
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 59 deletions.
24 changes: 13 additions & 11 deletions ports/msh3/dependencies_fix.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bd7155..b7adecc 100644
index d8a81ab..ea7626e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,7 +72,7 @@ target_include_directories(msh3_headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
@@ -66,7 +66,7 @@ target_include_directories(msh3_headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
option(LSQPACK_TESTS "Build tests" OFF)
option(LSQPACK_BIN "Build binaries" OFF)
Expand All @@ -11,35 +11,37 @@ index 4bd7155..b7adecc 100644

# Configure and build msquic dependency.
if (WIN32)
@@ -83,8 +83,9 @@ endif()
@@ -77,8 +77,8 @@ endif()
set(QUIC_BUILD_SHARED ON CACHE BOOL "Builds MsQuic as a dynamic library")
set(QUIC_ENABLE_LOGGING ON CACHE BOOL "Enable MsQuic logging")
set(CMAKE_BUILD_TYPE "Release")
-add_subdirectory(msquic)
-target_compile_features(inc INTERFACE cxx_std_20)
+find_package(msquic CONFIG REQUIRED)
+
+target_compile_features(msh3_headers INTERFACE cxx_std_20)

# Build msh3 library (and cmd line tool).
add_subdirectory(lib)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index ab7fc24..c488486 100644
index 4d7aeb7..4796fed 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -7,10 +7,7 @@ else()
@@ -7,11 +7,10 @@ else()
set(SOURCES msh3.cpp)
endif()
add_library(msh3 SHARED ${SOURCES})
-target_link_libraries(msh3 PRIVATE inc warnings msquic ls-qpack msh3_headers)
-if (NOT BUILD_SHARED_LIBS)
- target_link_libraries(msh3 PRIVATE base_link)
-endif()
+target_link_libraries(msh3 PRIVATE msquic ls-qpack::ls-qpack msh3_headers)
if (MSH3_SERVER_SUPPORT)
target_link_libraries(msh3 PRIVATE platform) # For selfsign APIs
+target_link_libraries(msh3 PRIVATE msquic::msquic msquic::msquic_platform ls-qpack::ls-qpack msh3_headers)
+if(WIN32)
+ target_link_libraries(msh3 PRIVATE ncrypt crypt32)
endif()
@@ -26,7 +23,11 @@ elseif (CX_PLATFORM STREQUAL "darwin")
-target_link_libraries(msh3 PRIVATE platform) # For selfsign APIs

if(WIN32)
SET_TARGET_PROPERTIES(msh3
@@ -24,7 +23,11 @@ elseif (CX_PLATFORM STREQUAL "darwin")
PROPERTIES LINK_FLAGS "-exported_symbols_list \"${CMAKE_CURRENT_SOURCE_DIR}/darwin/exports.txt\"")
endif()

Expand Down
2 changes: 1 addition & 1 deletion ports/msh3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nibanks/msh3
REF v${VERSION}
SHA512 e6ba4e8f4ce5cd3f586d61739148bf75dfddbe70f399b2e498e7d416c8d730a5f8c2c38f0eabe687049bb7525df44f5f511515ec578bc3832989f73961cdda72
SHA512 dedd8be43e44b4bebbf601d76b1f3b0135501330ed128ca710de942ef7d9142a21f1c1eb9efecf57881e72d93d68c7c2c085bc35d402eac5eabc57e77773be6b
HEAD_REF main
PATCHES
dependencies_fix.patch
Expand Down
5 changes: 2 additions & 3 deletions ports/msh3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "msh3",
"version": "0.6.0",
"port-version": 1,
"version": "0.7.0",
"description": "Minimal HTTP/3 library",
"homepage": "https://github.com/nibanks/msh3",
"license": "MIT",
"supports": "!uwp",
"supports": "!uwp & !osx & !(windows & x86)",
"dependencies": [
"ls-qpack",
"msquic",
Expand Down
13 changes: 0 additions & 13 deletions ports/msquic/all_headers.patch

This file was deleted.

41 changes: 18 additions & 23 deletions ports/msquic/fix-install.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt
index 2376823..d0592a3 100644
index 18048e3b7..241c75511 100644
--- a/src/bin/CMakeLists.txt
+++ b/src/bin/CMakeLists.txt
@@ -253,14 +253,14 @@ endif()
if(BUILD_SHARED_LIBS)
target_include_directories(msquic PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
- $<INSTALL_INTERFACE:${include_dest}>)
+ $<INSTALL_INTERFACE:include>)
else()
target_include_directories(msquic_static INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
- $<INSTALL_INTERFACE:${include_dest}>)
+ $<INSTALL_INTERFACE:include>)
target_include_directories(msquic INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
- $<INSTALL_INTERFACE:${include_dest}>)
+ $<INSTALL_INTERFACE:include>)
@@ -260,20 +260,20 @@ if(WIN32)
list(APPEND OTHER_TARGETS MsQuicEtw_Header)
endif()

set(PUBLIC_HEADERS
@@ -269,11 +269,10 @@ set(PUBLIC_HEADERS
../inc/msquic_posix.h
../inc/quic_sal_stub.h)

-if(BUILD_SHARED_LIBS)
- install(TARGETS msquic EXPORT msquic DESTINATION lib)
- install(TARGETS msquic msquic_platform inc logging_inc warnings main_binary_link_args ${OTHER_TARGETS} EXPORT msquic DESTINATION lib)
-else()
- install(FILES ${QUIC_STATIC_LIBRARY} DESTINATION lib)
-endif()
+install(TARGETS msquic EXPORT msquic
+install(TARGETS msquic msquic_platform inc logging_inc warnings main_binary_link_args ${OTHER_TARGETS} EXPORT msquic
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
install(FILES ${PUBLIC_HEADERS} DESTINATION include)

configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake)

install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION share/msquic)

-if(BUILD_SHARED_LIBS)
- install(EXPORT msquic DESTINATION share/msquic)
-endif()
+install(
+ EXPORT msquic
+ NAMESPACE msquic::
+ DESTINATION share/msquic)

if (MSVC AND NOT QUIC_ENABLE_SANITIZERS AND BUILD_SHARED_LIBS)
target_compile_options(msquic PRIVATE /analyze)
7 changes: 5 additions & 2 deletions ports/msquic/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ vcpkg_from_github(
OUT_SOURCE_PATH QUIC_SOURCE_PATH
REPO microsoft/msquic
REF "v${VERSION}"
SHA512 51afee7e28a7d6ae1b5491edd635e0c88a92a00bacedeaac632a0f19762e9940c9b819a9d33072d3553c004acd4ec0cdf645301f712b408498053de065b2b1cf
SHA512 c6e4b5f5d9b7e92469a6733a99eaf677909a5b2287869f0bbcc61fbcda6db4a6e920b327ede43fc9b1b0a3d09518c568dc1f38ad5fbb3ace14c1c031012b9968
HEAD_REF master
PATCHES
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
all_headers.patch
)

# This avoids a link error on x86-windows:
Expand Down Expand Up @@ -77,3 +76,7 @@ vcpkg_install_copyright(FILE_LIST "${QUIC_SOURCE_PATH}/LICENSE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/debug/include"
)

file(READ ${CURRENT_PACKAGES_DIR}/share/msquic/msquic.cmake msquic_cmake)
string(REGEX REPLACE "set_target_properties[(]msquic::OpenSSLQuic PROPERTIES.+\"\n[)]" "" msquic_cmake "${msquic_cmake}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/msquic/msquic.cmake "${msquic_cmake}")
3 changes: 1 addition & 2 deletions ports/msquic/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "msquic",
"version": "2.4.5",
"port-version": 1,
"version": "2.4.7",
"description": "Cross-platform, C implementation of the IETF QUIC protocol",
"homepage": "https://github.com/microsoft/msquic",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6153,8 +6153,8 @@
"port-version": 4
},
"msh3": {
"baseline": "0.6.0",
"port-version": 1
"baseline": "0.7.0",
"port-version": 0
},
"msinttypes": {
"baseline": "2018-02-25",
Expand All @@ -6169,8 +6169,8 @@
"port-version": 4
},
"msquic": {
"baseline": "2.4.5",
"port-version": 1
"baseline": "2.4.7",
"port-version": 0
},
"mstch": {
"baseline": "1.0.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/msh3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8b13603bf4beb51cca0f72d7b2151292beccd2d4",
"version": "0.7.0",
"port-version": 0
},
{
"git-tree": "6c26630aa357e123fe98a2dd4359b52681333a81",
"version": "0.6.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/msquic.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d18fdc2749e1477d916ad1b74a37112b47fca993",
"version": "2.4.7",
"port-version": 0
},
{
"git-tree": "7e20d48f6fdc1052f7339eeff9ea9ab1074a726c",
"version": "2.4.5",
Expand Down

0 comments on commit 75f7b1a

Please sign in to comment.