From 9ece7cf73f4e06a03ad1f0f3c7f5862dea5c4a3f Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Wed, 30 Dec 2020 21:23:33 +0800 Subject: [PATCH] cmake: fix mbedtls build --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e27924..9b28c15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,8 @@ set(LINK_LIBS ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES} ${JSON-C_LIBRARIES} $ set (CMAKE_REQUIRED_INCLUDES ${INCLUDE_DIRS}) include(CheckSymbolExists) check_symbol_exists(LWS_OPENSSL_SUPPORT "lws_config.h" LWS_OPENSSL_ENABLED) -if(LWS_OPENSSL_ENABLED) +check_symbol_exists(LWS_WITH_MBEDTLS "lws_config.h" LWS_MBEDTLS_ENABLED) +if(LWS_OPENSSL_ENABLED AND NOT LWS_MBEDTLS_ENABLED) find_package(OpenSSL REQUIRED) list(APPEND INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR}) list(APPEND LINK_LIBS ${OPENSSL_LIBRARIES}) -- 2.43.4