mirror of
https://github.com/curl/curl.git
synced 2026-04-21 06:22:12 +03:00
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
This commit is contained in:
parent
d4240b9bf2
commit
3fc81be44e
1 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue