Skip to content

Commit

Permalink
build: auto openssl vsn when link sys crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Sep 25, 2024
1 parent 14a5fb1 commit 146a167
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ else()
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()

if (DEFINED ENV{QUICER_USE_OPENSSL3})
message(STATUS "Use openssl3")
set(QUIC_TLS "openssl3")
endif()

if (DEFINED ENV{QUIC_USE_SYSTEM_LIBCRYPTO})
message(STATUS "Link to system libcrypto")
find_package(OpenSSL REQUIRED)
if ("${OPENSSL_VERSION}" MATCHES "3.*")
set(QUIC_TLS openssl3)
else()
set(QUIC_TLS openssl)
endif()
set(QUIC_USE_SYSTEM_LIBCRYPTO "ON")
else()
if (DEFINED ENV{QUIC_TLS})
set(QUIC_TLS $ENV{QUIC_TLS})
endif()
endif()

if (DEFINED ENV{QUIC_ENABLE_LOGGING})
Expand Down

0 comments on commit 146a167

Please sign in to comment.