Add option to build without OpenSSL
This commit is contained in:
parent
7c44f73ec5
commit
c466ed82d5
1 changed files with 6 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ project (Simple-Web-Server)
|
|||
|
||||
option(USE_STANDALONE_ASIO "set ON to use standalone Asio instead of Boost.Asio" OFF)
|
||||
option(BUILD_TESTING "set ON to build library tests" OFF)
|
||||
option(USE_OPENSSL "set OFF to build without OpenSSL" ON)
|
||||
|
||||
if(NOT MSVC)
|
||||
add_compile_options(-std=c++11 -Wall -Wextra -Wsign-conversion)
|
||||
|
|
@ -49,7 +50,9 @@ endif()
|
|||
if(APPLE)
|
||||
set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
|
||||
endif()
|
||||
if(USE_OPENSSL)
|
||||
find_package(OpenSSL)
|
||||
endif()
|
||||
if(OPENSSL_FOUND)
|
||||
target_compile_definitions(simple-web-server INTERFACE HAVE_OPENSSL)
|
||||
target_link_libraries(simple-web-server INTERFACE ${OPENSSL_LIBRARIES})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue