From: Shuanglei Tao Date: Sat, 28 Aug 2021 00:26:13 +0000 (+0800) Subject: cmake: check libuv support of libwebsockets X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=80c6f669eb1e258b3fd2568aa021b2c31b04b27c;p=ttyd.git cmake: check libuv support of libwebsockets --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f1ffd5b..822c8fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,8 +58,12 @@ set(LINK_LIBS ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES} ${JSON-C_LIBRARIES} $ set (CMAKE_REQUIRED_INCLUDES ${INCLUDE_DIRS}) include(CheckSymbolExists) +check_symbol_exists(LWS_WITH_LIBUV "lws_config.h" LWS_WITH_LIBUV) check_symbol_exists(LWS_OPENSSL_SUPPORT "lws_config.h" LWS_OPENSSL_ENABLED) check_symbol_exists(LWS_WITH_MBEDTLS "lws_config.h" LWS_MBEDTLS_ENABLED) +if(NOT LWS_WITH_LIBUV) + message(FATAL_ERROR "libwebsockets was not build with libuv support (-DLWS_WITH_LIBUV=ON)") +endif() if(LWS_OPENSSL_ENABLED AND NOT LWS_MBEDTLS_ENABLED) find_package(OpenSSL REQUIRED) list(APPEND INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})