From 69541cf75021106013bac4b91ee4c05142f4614a Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Fri, 22 Oct 2021 10:58:56 -0700 Subject: [PATCH] define macro for mbedtls >= 3 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87e83aed..72e5ac45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,6 +195,11 @@ if (USE_TLS) # This MBEDTLS_FOUND check is to help find a cmake manually configured MbedTLS if (NOT MBEDTLS_FOUND) find_package(MbedTLS REQUIRED) + + if (MBEDTLS_VERSION_GREATER_THAN_3) + target_compile_definitions(ixwebsocket PRIVATE IXWEBSOCKET_USE_MBED_TLS_MIN_VERSION_3) + endif() + endif() target_include_directories(ixwebsocket PUBLIC $) target_link_libraries(ixwebsocket ${MBEDTLS_LIBRARIES})