Skip to content

Commit

Permalink
cmake: add openssl check back
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Dec 30, 2020
1 parent 763d01d commit d96492a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Expand Up @@ -67,6 +67,15 @@ endif()
set(INCLUDE_DIRS ${ZLIB_INCLUDE_DIR} ${LIBWEBSOCKETS_INCLUDE_DIRS} ${JSON-C_INCLUDE_DIRS} ${LIBUV_INCLUDE_DIRS})
set(LINK_LIBS ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES} ${JSON-C_LIBRARIES} ${LIBUV_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)
find_package(OpenSSL REQUIRED)
list(APPEND INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
list(APPEND LINK_LIBS ${OPENSSL_LIBRARIES})
endif()

if(WIN32)
list(APPEND LINK_LIBS shell32)
elseif(NOT APPLE)
Expand Down

0 comments on commit d96492a

Please sign in to comment.