Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions cmake/deps/curl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,35 @@ include(FetchContent)
SET(BUILD_CURL_EXE OFF CACHE BOOL "" FORCE)
set(BUILD_LIBCURL_DOCS OFF CACHE BOOL "" FORCE)
set(BUILD_MISC_DOCS OFF CACHE BOOL "" FORCE)
set(CURL_DISABLE_TESTS ON CACHE BOOL "" FORCE)

# No cache force below, because it would turn off a parent project's tests and examples
set(BUILD_EXAMPLES OFF)
set(BUILD_TESTING OFF)

# Disable all protocols except HTTP
SET(HTTP_ONLY ON CACHE BOOL "" FORCE)
foreach(protocol DICT FILE FTP GOPHER IMAP IPFS LDAP LDAPS MQTT POP3 RTSP SMTP TELNET TFTP WEBSOCKETS)
set(CURL_DISABLE_${protocol} ON CACHE BOOL "" FORCE)
endforeach()
Comment thread
xlamorlette-datadog marked this conversation as resolved.
Resolved

# Disable curl features
SET(USE_ZLIB OFF CACHE BOOL "" FORCE)
SET(USE_LIBIDN2 OFF CACHE BOOL "" FORCE)
SET(CURL_ENABLE_SSL OFF CACHE BOOL "" FORCE)
SET(CURL_BROTLI OFF CACHE BOOL "" FORCE)
SET(CURL_ZSTD OFF CACHE BOOL "" FORCE)
SET(CURL_ZLIB OFF CACHE BOOL "" FORCE)
SET(CURL_USE_LIBSSH2 OFF CACHE BOOL "" FORCE)
SET(CURL_USE_LIBPSL OFF CACHE BOOL "" FORCE)
set(CURL_DISABLE_ALTSVC ON CACHE BOOL "" FORCE)
SET(CURL_DISABLE_HSTS ON CACHE BOOL "" FORCE)
set(CURL_CA_PATH "none")
set(CURL_CA_PATH_SET FALSE CACHE BOOL "" FORCE)
set(CURL_DISABLE_INSTALL ON CACHE BOOL "" FORCE)
set(CURL_DISABLE_ALTSVC ON CACHE BOOL "" FORCE)
set(CURL_DISABLE_SRP ON CACHE BOOL "" FORCE)
SET(CURL_ENABLE_SSL OFF CACHE BOOL "" FORCE)
SET(CURL_USE_LIBPSL OFF CACHE BOOL "" FORCE)
SET(CURL_USE_LIBSSH2 OFF CACHE BOOL "" FORCE)
SET(CURL_ZLIB OFF CACHE BOOL "" FORCE)
SET(CURL_ZSTD OFF CACHE BOOL "" FORCE)
SET(USE_LIBIDN2 OFF CACHE BOOL "" FORCE)
set(USE_NGHTTP2 OFF CACHE BOOL "" FORCE)

set(SHARE_LIB_OBJECT ON CACHE BOOL "" FORCE)

FetchContent_Declare(
CURL
URL "https://github.com/curl/curl/releases/download/curl-8_8_0/curl-8.8.0.tar.gz"
URL_MD5 "2300048f61e6196678281a8612a873ef"
URL "https://github.com/curl/curl/releases/download/curl-8_23_0/curl-8.23.0.tar.gz"
URL_HASH SHA256=e3de77cfa6367083c776a26647fc9f633b538c06c3baa73d931a252ac8f72b49
FIND_PACKAGE_ARGS NAMES CURL
EXCLUDE_FROM_ALL
SYSTEM
Expand Down
Loading