Skip to content

Commit 97d8be9

Browse files
authored
fix release mac openssl sys for emqx (#324)
1 parent 43e1367 commit 97d8be9

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/main.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ jobs:
3030
os:
3131
- macos-14
3232
otp:
33-
- 25
3433
- 26
34+
openssl:
35+
- openssl3
36+
- openssl
37+
- sys
3538
runs-on: ${{ matrix.os }}
3639
steps:
3740
- name: Checkout
@@ -51,6 +54,8 @@ jobs:
5154
brew install erlang@${{ matrix.otp }}
5255
echo "$(brew --prefix erlang@${{ matrix.otp }})/bin" >> $GITHUB_PATH
5356
- name: release build
57+
env:
58+
QUICER_TLS_VER: ${{ matrix.openssl }}
5459
run: |
5560
wget https://s3.amazonaws.com/rebar3/rebar3
5661
sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3

.github/workflows/release.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
otp:
21-
- 25
2221
- 26
2322
openssl:
2423
- openssl3

CMakeLists.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if (DEFINED ENV{QUICER_TLS_VER})
4646
endif()
4747
set(QUIC_USE_SYSTEM_LIBCRYPTO "ON")
4848
else()
49-
set(QUIC_TLS $ENV{QUICER_TLS_VER})
49+
set(QUIC_TLS $ENV{QUICER_TLS_VER} CACHE STRING "QUIC_TLS")
5050
endif()
5151

5252
endif()
@@ -173,8 +173,12 @@ endif()
173173

174174
add_library(quicer_nif SHARED ${SOURCES})
175175

176-
# for macOS Workaround to use opensslquic head files.
177-
target_include_directories(quicer_nif PUBLIC "c_build/_deps/opensslquic-build/openssl/include")
176+
if (OPENSSL_INCLUDE_DIR)
177+
# for sys crypto
178+
target_include_directories(quicer_nif PUBLIC ${OPENSSL_INCLUDE_DIR})
179+
else()
180+
target_include_directories(quicer_nif PUBLIC "c_build/_deps/opensslquic-build/${QUIC_TLS}/include")
181+
endif()
178182

179183
if (CMAKE_SYSTEM_NAME MATCHES Linux)
180184
target_link_libraries(quicer_nif PRIVATE quicer_static "-Wl,--no-gc-sections -pthread") # no gc because of erlang nif symbols

0 commit comments

Comments
 (0)