summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b50b02ed..2d614fae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -313,6 +313,7 @@ if(WITH_OPENSSL)
if(HAVE_LIBCRYPTO)
set(CRYPTO_LIBRARY crypto)
check_library_exists(ssl SSL_new "" HAVE_LIBSSL)
+ set(HAVE_OPENSSL 1)
endif()
endif()
else()
@@ -362,6 +363,7 @@ if(WITH_WOLFSSL)
if(HAVE_LIBCRYPTO)
set(CRYPTO_LIBRARY ${WOLFSSL_LIBRARY})
add_definitions(-DHAVE_WOLFSSL_SSL_H)
+ set(HAVE_WOLFSSL 1)
endif()
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
@@ -1115,16 +1117,7 @@ if(NOT BUILD_STATIC)
endif()
if(NOT ${CRYPTO_LIBRARY} EQUAL "")
- if(NOT WITH_WOLFSSL)
- target_link_libraries(lighttpd ssl)
- endif()
target_link_libraries(lighttpd ${CRYPTO_LIBRARY})
- add_and_install_library(mod_openssl "mod_openssl.c")
- if(NOT WITH_WOLFSSL)
- set(L_MOD_OPENSSL ${L_MOD_OPENSSL} ssl)
- endif()
- set(L_MOD_OPENSSL ${L_MOD_OPENSSL} ${CRYPTO_LIBRARY})
- target_link_libraries(mod_openssl ${L_MOD_OPENSSL})
target_link_libraries(mod_auth ${CRYPTO_LIBRARY})
set(L_MOD_AUTHN_FILE ${L_MOD_AUTHN_FILE} ${CRYPTO_LIBRARY})
target_link_libraries(mod_authn_file ${L_MOD_AUTHN_FILE})
@@ -1132,15 +1125,23 @@ if(NOT ${CRYPTO_LIBRARY} EQUAL "")
target_link_libraries(mod_wstunnel ${CRYPTO_LIBRARY})
endif()
+if(HAVE_OPENSSL)
+ add_and_install_library(mod_openssl "mod_openssl.c")
+ set(L_MOD_OPENSSL ${L_MOD_OPENSSL} ssl crypto)
+ target_link_libraries(mod_openssl ${L_MOD_OPENSSL})
+endif()
+
+if(HAVE_WOLFSSL)
+ add_and_install_library(mod_wolfssl "mod_wolfssl.c")
+ target_link_libraries(mod_wolfssl wolfssl)
+endif()
+
if(HAVE_LIBGNUTLS)
add_and_install_library(mod_gnutls "mod_gnutls.c")
target_link_libraries(mod_gnutls gnutls)
endif()
if(HAVE_LIBMBEDTLS AND HAVE_LIBMEDCRYPTO AND HAVE_LIBMEDX509)
- target_link_libraries(lighttpd mbedtls)
- target_link_libraries(lighttpd mbedcrypto)
- target_link_libraries(lighttpd mbedx509)
add_and_install_library(mod_mbedtls "mod_mbedtls.c")
set(L_MOD_MBEDTLS ${L_MOD_MBEDTLS} mbedtls mbedcrypto mbedx509)
target_link_libraries(mod_mbedtls ${L_MOD_MBEDTLS})