automatically enable SSL support if we detect libssl-dev;

pull/87/head
Bryan Biedenkapp 10 months ago
parent 030a09ebe9
commit 10f6514c55

@ -27,14 +27,6 @@ else ()
message(CHECK_PASS "no") message(CHECK_PASS "no")
endif (ENABLE_TUI_SUPPORT) endif (ENABLE_TUI_SUPPORT)
option(ENABLE_SSL "Enable SSL support" off)
message(CHECK_START "Enable SSL support")
if (ENABLE_SSL)
message(CHECK_PASS "yes")
else ()
message(CHECK_PASS "no")
endif (ENABLE_SSL)
option(DISABLE_WEBSOCKETS "Disable WebSocket support" off) option(DISABLE_WEBSOCKETS "Disable WebSocket support" off)
if (DISABLE_WEBSOCKETS) if (DISABLE_WEBSOCKETS)
message(CHECK_START "Disable WebSocket support - enabled") message(CHECK_START "Disable WebSocket support - enabled")
@ -54,8 +46,6 @@ if (COMPILE_WIN32)
# No TUI for this # No TUI for this
set(ENABLE_TUI_SUPPORT OFF) set(ENABLE_TUI_SUPPORT OFF)
message(CHECK_START "Enable TUI support - no; for simplicity WIN32 does not support TUI.") message(CHECK_START "Enable TUI support - no; for simplicity WIN32 does not support TUI.")
set(ENABLE_SSL OFF)
message(CHECK_START "Enable SSL support - no; for simplicity WIN32 does not support SSL.")
else() else()
set(CMAKE_C_COMPILER /usr/bin/gcc CACHE STRING "C compiler") set(CMAKE_C_COMPILER /usr/bin/gcc CACHE STRING "C compiler")
set(CMAKE_CXX_COMPILER /usr/bin/g++ CACHE STRING "C++ compiler") set(CMAKE_CXX_COMPILER /usr/bin/g++ CACHE STRING "C++ compiler")

@ -17,10 +17,6 @@ else()
set(ENABLE_SETUP_TUI off) set(ENABLE_SETUP_TUI off)
endif (ENABLE_TUI_SUPPORT) endif (ENABLE_TUI_SUPPORT)
if (ENABLE_SSL)
add_definitions(-DENABLE_SSL)
endif (ENABLE_SSL)
option(DISABLE_TUI_APPS "Disable extra TUI applications" off) option(DISABLE_TUI_APPS "Disable extra TUI applications" off)
if (DISABLE_TUI_APPS) if (DISABLE_TUI_APPS)
message(CHECK_START "Disable extra TUI applications - enabled") message(CHECK_START "Disable extra TUI applications - enabled")
@ -172,7 +168,19 @@ if (HAVE_SENDMMSG)
endif (HAVE_SENDMMSG) endif (HAVE_SENDMMSG)
# are we enabling SSL support? # are we enabling SSL support?
if (ENABLE_SSL) if (NOT COMPILE_WIN32)
find_package(OpenSSL REQUIRED) find_package(OpenSSL REQUIRED)
include_directories("${OPENSSL_INCLUDE_DIR}") if (OpenSSL_FOUND)
endif (ENABLE_SSL) message(STATUS "OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message(STATUS "OpenSSL libraries: ${OPENSSL_LIBRARIES}")
message(CHECK_START "Enable SSL support")
message(CHECK_PASS "yes")
add_definitions(-DENABLE_SSL)
include_directories("${OPENSSL_INCLUDE_DIR}")
else (OpenSSL_FOUND)
message(STATUS "OpenSSL not found, SSL support disabled")
message(CHECK_START "Enable SSL support")
message(CHECK_PASS "no")
endif (OpenSSL_FOUND)
endif (NOT COMPILE_WIN32)

Loading…
Cancel
Save

Powered by TurnKey Linux.