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})