From: Viktor Szakats Date: Fri, 30 Aug 2024 18:42:54 +0000 (+0200) Subject: cmake: sync `CURL_DISABLE_*` behaviour with autotools X-Git-Tag: curl-8_10_0~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fc81be44e970215f6ca18ab331ac2050abda58b;p=thirdparty%2Fcurl.git cmake: sync `CURL_DISABLE_*` behaviour with autotools - disable RTSP, ALTSVC, HSTS when HTTP is disabled. (`./configure` warning deemed unnecessary and not replicated with cmake.) - disable HSTS when there is no TLS backend. Tested via #14744 Closes #14745 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e846abd4a..3f639e94eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,6 +330,12 @@ mark_as_advanced(CURL_DISABLE_TFTP) option(CURL_DISABLE_VERBOSE_STRINGS "Disable verbose strings" OFF) mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS) +if(CURL_DISABLE_HTTP) + set(CURL_DISABLE_RTSP ON) + set(CURL_DISABLE_ALTSVC ON) + set(CURL_DISABLE_HSTS ON) +endif() + # Corresponds to HTTP_ONLY in lib/curl_setup.h option(HTTP_ONLY "Disable all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF) mark_as_advanced(HTTP_ONLY) @@ -492,6 +498,8 @@ count_true(_enabled_ssl_options_count ) if(_enabled_ssl_options_count GREATER 1) set(CURL_WITH_MULTI_SSL ON) +elseif(_enabled_ssl_options_count EQUAL 0) + set(CURL_DISABLE_HSTS ON) endif() if(CURL_USE_SCHANNEL)