diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7931894..94994203 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,8 +30,11 @@ jobs: os: - macos-14 otp: - - 25 - 26 + openssl: + - openssl3 + - openssl + - sys runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -51,6 +54,8 @@ jobs: brew install erlang@${{ matrix.otp }} echo "$(brew --prefix erlang@${{ matrix.otp }})/bin" >> $GITHUB_PATH - name: release build + env: + QUICER_TLS_VER: ${{ matrix.openssl }} run: | wget https://s3.amazonaws.com/rebar3/rebar3 sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9bf4f176..180d583a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,6 @@ jobs: fail-fast: false matrix: otp: - - 25 - 26 openssl: - openssl3 diff --git a/CMakeLists.txt b/CMakeLists.txt index c082f3b0..9a976faf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ if (DEFINED ENV{QUICER_TLS_VER}) endif() set(QUIC_USE_SYSTEM_LIBCRYPTO "ON") else() - set(QUIC_TLS $ENV{QUICER_TLS_VER}) + set(QUIC_TLS $ENV{QUICER_TLS_VER} CACHE STRING "QUIC_TLS") endif() endif() @@ -173,8 +173,12 @@ endif() add_library(quicer_nif SHARED ${SOURCES}) -# for macOS Workaround to use opensslquic head files. -target_include_directories(quicer_nif PUBLIC "c_build/_deps/opensslquic-build/openssl/include") +if (OPENSSL_INCLUDE_DIR) + # for sys crypto + target_include_directories(quicer_nif PUBLIC ${OPENSSL_INCLUDE_DIR}) +else() + target_include_directories(quicer_nif PUBLIC "c_build/_deps/opensslquic-build/${QUIC_TLS}/include") +endif() if (CMAKE_SYSTEM_NAME MATCHES Linux) target_link_libraries(quicer_nif PRIVATE quicer_static "-Wl,--no-gc-sections -pthread") # no gc because of erlang nif symbols