From 87672682410e98492f5651fe86af1959efd83314 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 30 Jul 2020 12:13:42 +0200 Subject: [PATCH] EttercapLibCheck: don't forcibly require curl if plugins are enabled, we can still build all the others plugins except for sslstrip. --- cmake/Modules/EttercapLibCheck.cmake | 39 +++++++++++++--------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/cmake/Modules/EttercapLibCheck.cmake b/cmake/Modules/EttercapLibCheck.cmake index 320fcc474..45e651594 100644 --- a/cmake/Modules/EttercapLibCheck.cmake +++ b/cmake/Modules/EttercapLibCheck.cmake @@ -149,32 +149,29 @@ if(ENABLE_PLUGINS) endif() endif() -if(HAVE_PLUGINS) - # Fake target for curl - add_custom_target(curl) +# Fake target for curl +add_custom_target(curl) - # sslstrip has a requirement for libcurl >= 7.26.0 - if(SYSTEM_CURL) - message(STATUS "CURL support requested. Will look for curl >= 7.26.0") - find_package(CURL 7.26.0) +# sslstrip has a requirement for libcurl >= 7.26.0 +if(SYSTEM_CURL) + message(STATUS "CURL support requested. Will look for curl >= 7.26.0") + find_package(CURL 7.26.0) - if(NOT CURL_FOUND) - message(STATUS "Couldn't find a suitable system-provided version of Curl") - endif() - endif() - - if(BUNDLED_CURL AND (NOT CURL_FOUND)) - message(STATUS "Using bundled version of Curl") - add_subdirectory(bundled_deps/curl) # EXCLUDE_FROM_ALL) - add_dependencies(curl bundled_curl) - add_dependencies(bundled bundled_curl) - endif() - - # Still haven't found curl? Bail! if(NOT CURL_FOUND) - message(FATAL_ERROR "Could not find Curl!") + message(STATUS "Couldn't find a suitable system-provided version of Curl") endif() +endif() + +if(BUNDLED_CURL AND (NOT CURL_FOUND)) + message(STATUS "Using bundled version of Curl") + add_subdirectory(bundled_deps/curl) # EXCLUDE_FROM_ALL) + add_dependencies(curl bundled_curl) + add_dependencies(bundled bundled_curl) +endif() +# Still haven't found curl? Bail! +if(NOT CURL_FOUND) + message(STATUS "Could not find Curl, sslstrip and curl support will be disabled!") endif() check_function_exists(poll HAVE_POLL)