-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and expose curl as a cmake target
- Loading branch information
Showing
2 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
include(FetchContent) | ||
|
||
# No need to build curl executable | ||
SET(BUILD_CURL_EXE OFF) | ||
SET(BUILD_SHARED_LIBS OFF) | ||
SET(BUILD_STATIC_LIBS ON) | ||
|
||
# Disables all protocols except HTTP | ||
SET(HTTP_ONLY ON) | ||
SET(CURL_ENABLE_SSL OFF) | ||
SET(CURL_BROTLI OFF) | ||
SET(CURL_ZSTD OFF) | ||
SET(USE_ZLIB OFF) | ||
SET(USE_LIBIDN2 OFF) | ||
|
||
FetchContent_Declare( | ||
curl | ||
URL "https://github.com/curl/curl/releases/download/curl-7_85_0/curl-7.85.0.tar.gz" | ||
URL_MD5 "4e9eb4f434e9be889e510f038754d3de" | ||
) | ||
|
||
FetchContent_MakeAvailable(curl) |