From: Shuanglei Tao Date: Wed, 30 Dec 2020 13:23:33 +0000 (+0800) Subject: cmake: fix mbedtls build X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=9ece7cf73f4e06a03ad1f0f3c7f5862dea5c4a3f;p=ttyd.git cmake: fix mbedtls build --- 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})