Skip to content

Commit c21a590

Browse files
authored
Properly set quic tls variable to openssl on windows (#26)
1 parent b8df399 commit c21a590

File tree

2 files changed

+51
-9
lines changed

2 files changed

+51
-9
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ on:
99
permissions: read-all
1010

1111
jobs:
12-
build-linux:
12+
build-linux-openssl:
1313
permissions:
1414
contents: read
15-
name: Build Linux
15+
name: Build Linux (OpenSSL)
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Harden Runner
@@ -30,7 +30,7 @@ jobs:
3030
- name: Upload
3131
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
3232
with:
33-
name: bin-linux
33+
name: bin-linux-openssl
3434
path: |
3535
build/**/*.so
3636
build/**/msh3app
@@ -42,10 +42,48 @@ jobs:
4242
run: /usr/local/lib/msh3app www.cloudflare.com
4343
- name: GET www.google.com
4444
run: /usr/local/lib/msh3app www.google.com
45-
build-windows:
45+
build-windows-openssl:
4646
permissions:
4747
contents: read
48-
name: Build Windows
48+
name: Build Windows (OpenSSL)
49+
runs-on: windows-latest
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5
53+
with:
54+
submodules: 'recursive'
55+
- name: Install Perl
56+
uses: shogo82148/[email protected]
57+
with:
58+
perl-version: '5.34'
59+
- name: Install NASM
60+
uses: ilammy/[email protected]
61+
- name: Generate
62+
run: mkdir build && cd build && cmake -G 'Visual Studio 17 2022' -A x64 -DQUIC_TLS=openssl -DMSH3_TOOL=on ..
63+
- name: Build
64+
run: cd build && cmake --build .
65+
- name: Upload
66+
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
67+
with:
68+
name: bin-windows-openssl
69+
path: |
70+
build/**/*.dll
71+
build/**/msh3app.exe
72+
- name: Install
73+
run: cd build && cmake --install . --config Debug
74+
- name: GET outlook.office.com
75+
run: |
76+
& 'C:/Program Files/msh3/lib/msh3app' outlook.office.com
77+
- name: GET www.cloudflare.com
78+
run: |
79+
& 'C:/Program Files/msh3/lib/msh3app' www.cloudflare.com
80+
- name: GET www.google.com
81+
run: |
82+
& 'C:/Program Files/msh3/lib/msh3app' www.google.com
83+
build-windows-schannel:
84+
permissions:
85+
contents: read
86+
name: Build Windows (Schannel)
4987
runs-on: windows-latest
5088
steps:
5189
- name: Checkout repository
@@ -59,7 +97,7 @@ jobs:
5997
- name: Upload
6098
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
6199
with:
62-
name: bin-windows
100+
name: bin-windows-schannel
63101
path: |
64102
build/**/*.dll
65103
build/**/msh3app.exe

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ option(MSH3_TOOL "Build tool" OFF)
88

99
# use, i.e. don't skip the full RPATH for the build tree
1010
set(CMAKE_SKIP_BUILD_RPATH FALSE)
11-
11+
1212
# when building, don't use the install RPATH already
1313
# (but later on when installing)
1414
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
1515
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
16-
16+
1717
# add the automatically determined parts of the RPATH
1818
# which point to directories outside the build tree to the install RPATH
1919
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
@@ -29,7 +29,11 @@ option(LSQPACK_BIN "Build binaries" OFF)
2929
add_subdirectory(ls-qpack)
3030

3131
# Configure and build msquic dependency.
32-
set(QUIC_TLS "openssl")
32+
if (WIN32)
33+
set(QUIC_TLS "schannel" CACHE STRING "TLS Library to use")
34+
else()
35+
set(QUIC_TLS "openssl" CACHE STRING "TLS Library to use")
36+
endif()
3337
set(QUIC_ENABLE_LOGGING ON CACHE BOOL "Enable MsQuic logging")
3438
set(CMAKE_BUILD_TYPE "Release")
3539
add_subdirectory(msquic)

0 commit comments

Comments
 (0)