Add a config option allowing to disable SSL.
This commit is contained in:
+11
-7
@@ -20,9 +20,11 @@ if(WIN32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(WEBCC_ENABLE_LOG 1 CACHE STRING "Enable logging? (0:OFF, 1:ON)")
|
||||
set(WEBCC_ENABLE_LOG 1 CACHE STRING "Enable logging? (1:Yes, 0:No)")
|
||||
set(WEBCC_LOG_LEVEL 2 CACHE STRING "Log level (0:VERB, 1:INFO, 2:WARN, 3:ERRO or 4:FATA)")
|
||||
|
||||
set(WEBCC_ENABLE_SSL 0 CACHE STRING "Enable SSL/HTTPS (need OpenSSL)? (1:Yes, 0:No)")
|
||||
|
||||
if(WEBCC_ENABLE_UNITTEST)
|
||||
enable_testing()
|
||||
endif()
|
||||
@@ -84,12 +86,14 @@ if(Boost_FOUND)
|
||||
message(STATUS ${Boost_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(OPENSSL_USE_STATIC_LIBS ON)
|
||||
set(OPENSSL_MSVC_STATIC_RT ON)
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
message(STATUS "OpenSSL libs: " ${OPENSSL_LIBRARIES})
|
||||
if(WEBCC_ENABLE_SSL)
|
||||
set(OPENSSL_USE_STATIC_LIBS ON)
|
||||
set(OPENSSL_MSVC_STATIC_RT ON)
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
message(STATUS "OpenSSL libs: " ${OPENSSL_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
|
||||
Reference in New Issue
Block a user