From fedf750e1b323cab927d08393783927a6db1e912 Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Thu, 16 Apr 2020 16:46:33 +0200 Subject: externals: Move LibreSSL linking to httplib. Neither core nor web_services use OpenSSL nor LibreSSL. However they need to link them as it's a requirement of httplib. So let's declare this within httplib instead of core and web_services. --- externals/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'externals/CMakeLists.txt') diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 61ad3487a..a1d0452c3 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -86,7 +86,10 @@ if (ENABLE_WEB_SERVICE) set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "") add_subdirectory(libressl EXCLUDE_FROM_ALL) target_include_directories(ssl INTERFACE ./libressl/include) - target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP) + target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP) + get_directory_property(OPENSSL_LIBRARIES + DIRECTORY libressl + DEFINITION OPENSSL_LIBS) # lurlparser add_subdirectory(lurlparser EXCLUDE_FROM_ALL) @@ -94,6 +97,8 @@ if (ENABLE_WEB_SERVICE) # httplib add_library(httplib INTERFACE) target_include_directories(httplib INTERFACE ./httplib) + target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT) + target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES}) # JSON add_library(json-headers INTERFACE) -- cgit v1.2.3