xref: /aosp_15_r20/external/curl/docs/INSTALL-CMAKE.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<!--
2*6236dae4SAndroid Build Coastguard WorkerCopyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard Worker
4*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
5*6236dae4SAndroid Build Coastguard Worker-->
6*6236dae4SAndroid Build Coastguard Worker
7*6236dae4SAndroid Build Coastguard Worker# Building with CMake
8*6236dae4SAndroid Build Coastguard Worker
9*6236dae4SAndroid Build Coastguard WorkerThis document describes how to configure, build and install curl and libcurl
10*6236dae4SAndroid Build Coastguard Workerfrom source code using the CMake build tool. To build with CMake, you of
11*6236dae4SAndroid Build Coastguard Workercourse first have to install CMake. The minimum required version of CMake is
12*6236dae4SAndroid Build Coastguard Workerspecified in the file `CMakeLists.txt` found in the top of the curl source
13*6236dae4SAndroid Build Coastguard Workertree. Once the correct version of CMake is installed you can follow the
14*6236dae4SAndroid Build Coastguard Workerinstructions below for the platform you are building on.
15*6236dae4SAndroid Build Coastguard Worker
16*6236dae4SAndroid Build Coastguard WorkerCMake builds can be configured either from the command line, or from one of
17*6236dae4SAndroid Build Coastguard WorkerCMake's GUIs.
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard Worker# Configuring
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard WorkerA CMake configuration of curl is similar to the autotools build of curl.
22*6236dae4SAndroid Build Coastguard WorkerIt consists of the following steps after you have unpacked the source.
23*6236dae4SAndroid Build Coastguard Worker
24*6236dae4SAndroid Build Coastguard Worker## Using `cmake`
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard WorkerYou can configure for in source tree builds or for a build tree
27*6236dae4SAndroid Build Coastguard Workerthat is apart from the source tree.
28*6236dae4SAndroid Build Coastguard Worker
29*6236dae4SAndroid Build Coastguard Worker - Build in the source tree.
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard Worker       $ cmake -B .
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard Worker - Build in a separate directory (parallel to the curl source tree in this
34*6236dae4SAndroid Build Coastguard Worker   example). The build directory is created for you.
35*6236dae4SAndroid Build Coastguard Worker
36*6236dae4SAndroid Build Coastguard Worker       $ cmake -B ../curl-build
37*6236dae4SAndroid Build Coastguard Worker
38*6236dae4SAndroid Build Coastguard Worker### Fallback for CMake before version 3.13
39*6236dae4SAndroid Build Coastguard Worker
40*6236dae4SAndroid Build Coastguard WorkerCMake before version 3.13 does not support the `-B` option. In that case,
41*6236dae4SAndroid Build Coastguard Workeryou must create the build directory yourself, `cd` to it and run `cmake`
42*6236dae4SAndroid Build Coastguard Workerfrom there:
43*6236dae4SAndroid Build Coastguard Worker
44*6236dae4SAndroid Build Coastguard Worker    $ mkdir ../curl-build
45*6236dae4SAndroid Build Coastguard Worker    $ cd ../curl-build
46*6236dae4SAndroid Build Coastguard Worker    $ cmake ../curl
47*6236dae4SAndroid Build Coastguard Worker
48*6236dae4SAndroid Build Coastguard WorkerIf you want to build in the source tree, it is enough to do this:
49*6236dae4SAndroid Build Coastguard Worker
50*6236dae4SAndroid Build Coastguard Worker    $ cmake .
51*6236dae4SAndroid Build Coastguard Worker
52*6236dae4SAndroid Build Coastguard Worker### Build system generator selection
53*6236dae4SAndroid Build Coastguard Worker
54*6236dae4SAndroid Build Coastguard WorkerYou can override CMake's default by using `-G <generator-name>`. For example
55*6236dae4SAndroid Build Coastguard Workeron Windows with multiple build systems if you have MinGW-w64 then you could use
56*6236dae4SAndroid Build Coastguard Worker`-G "MinGW Makefiles"`.
57*6236dae4SAndroid Build Coastguard Worker[List of generator names](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html).
58*6236dae4SAndroid Build Coastguard Worker
59*6236dae4SAndroid Build Coastguard Worker## Using `ccmake`
60*6236dae4SAndroid Build Coastguard Worker
61*6236dae4SAndroid Build Coastguard WorkerCMake comes with a curses based interface called `ccmake`. To run `ccmake`
62*6236dae4SAndroid Build Coastguard Workeron a curl use the instructions for the command line cmake, but substitute
63*6236dae4SAndroid Build Coastguard Worker`ccmake` for `cmake`.
64*6236dae4SAndroid Build Coastguard Worker
65*6236dae4SAndroid Build Coastguard WorkerThis brings up a curses interface with instructions on the bottom of the
66*6236dae4SAndroid Build Coastguard Workerscreen. You can press the "c" key to configure the project, and the "g" key to
67*6236dae4SAndroid Build Coastguard Workergenerate the project. After the project is generated, you can run make.
68*6236dae4SAndroid Build Coastguard Worker
69*6236dae4SAndroid Build Coastguard Worker## Using `cmake-gui`
70*6236dae4SAndroid Build Coastguard Worker
71*6236dae4SAndroid Build Coastguard WorkerCMake also comes with a Qt based GUI called `cmake-gui`. To configure with
72*6236dae4SAndroid Build Coastguard Worker`cmake-gui`, you run `cmake-gui` and follow these steps:
73*6236dae4SAndroid Build Coastguard Worker
74*6236dae4SAndroid Build Coastguard Worker 1. Fill in the "Where is the source code" combo box with the path to
75*6236dae4SAndroid Build Coastguard Worker    the curl source tree.
76*6236dae4SAndroid Build Coastguard Worker 2. Fill in the "Where to build the binaries" combo box with the path to
77*6236dae4SAndroid Build Coastguard Worker    the directory for your build tree, ideally this should not be the same
78*6236dae4SAndroid Build Coastguard Worker    as the source tree, but a parallel directory called curl-build or
79*6236dae4SAndroid Build Coastguard Worker    something similar.
80*6236dae4SAndroid Build Coastguard Worker 3. Once the source and binary directories are specified, press the
81*6236dae4SAndroid Build Coastguard Worker    "Configure" button.
82*6236dae4SAndroid Build Coastguard Worker 4. Select the native build tool that you want to use.
83*6236dae4SAndroid Build Coastguard Worker 5. At this point you can change any of the options presented in the GUI.
84*6236dae4SAndroid Build Coastguard Worker    Once you have selected all the options you want, click the "Generate"
85*6236dae4SAndroid Build Coastguard Worker    button.
86*6236dae4SAndroid Build Coastguard Worker
87*6236dae4SAndroid Build Coastguard Worker# Building
88*6236dae4SAndroid Build Coastguard Worker
89*6236dae4SAndroid Build Coastguard WorkerBuild (you have to specify the build directory).
90*6236dae4SAndroid Build Coastguard Worker
91*6236dae4SAndroid Build Coastguard Worker    $ cmake --build ../curl-build
92*6236dae4SAndroid Build Coastguard Worker
93*6236dae4SAndroid Build Coastguard Worker## Static builds
94*6236dae4SAndroid Build Coastguard Worker
95*6236dae4SAndroid Build Coastguard WorkerThe CMake build setup is primarily done to work with shared/dynamic third
96*6236dae4SAndroid Build Coastguard Workerparty dependencies. When linking with shared libraries, the dependency "chain"
97*6236dae4SAndroid Build Coastguard Workeris handled automatically by the library loader - on all modern systems.
98*6236dae4SAndroid Build Coastguard Worker
99*6236dae4SAndroid Build Coastguard WorkerIf you instead link with a static library, you need to provide all the
100*6236dae4SAndroid Build Coastguard Workerdependency libraries already at the link command line.
101*6236dae4SAndroid Build Coastguard Worker
102*6236dae4SAndroid Build Coastguard WorkerFiguring out all the dependency libraries for a given library is hard, as it
103*6236dae4SAndroid Build Coastguard Workermight involve figuring out the dependencies of the dependencies and they vary
104*6236dae4SAndroid Build Coastguard Workerbetween platforms and can change between versions.
105*6236dae4SAndroid Build Coastguard Worker
106*6236dae4SAndroid Build Coastguard WorkerWhen using static dependencies, the build scripts mostly assume that you, the
107*6236dae4SAndroid Build Coastguard Workeruser, provide all the necessary additional dependency libraries as additional
108*6236dae4SAndroid Build Coastguard Workerarguments in the build.
109*6236dae4SAndroid Build Coastguard Worker
110*6236dae4SAndroid Build Coastguard WorkerBuilding statically is not for the faint of heart.
111*6236dae4SAndroid Build Coastguard Worker
112*6236dae4SAndroid Build Coastguard Worker### Fallback for CMake before version 3.13
113*6236dae4SAndroid Build Coastguard Worker
114*6236dae4SAndroid Build Coastguard WorkerCMake before version 3.13 does not support the `--build` option. In that
115*6236dae4SAndroid Build Coastguard Workercase, you have to `cd` to the build directory and use the building tool that
116*6236dae4SAndroid Build Coastguard Workercorresponds to the build files that CMake generated for you. This example
117*6236dae4SAndroid Build Coastguard Workerassumes that CMake generates `Makefile`:
118*6236dae4SAndroid Build Coastguard Worker
119*6236dae4SAndroid Build Coastguard Worker    $ cd ../curl-build
120*6236dae4SAndroid Build Coastguard Worker    $ make
121*6236dae4SAndroid Build Coastguard Worker
122*6236dae4SAndroid Build Coastguard Worker# Testing
123*6236dae4SAndroid Build Coastguard Worker
124*6236dae4SAndroid Build Coastguard Worker(The test suite does not yet work with the cmake build)
125*6236dae4SAndroid Build Coastguard Worker
126*6236dae4SAndroid Build Coastguard Worker# Installing
127*6236dae4SAndroid Build Coastguard Worker
128*6236dae4SAndroid Build Coastguard WorkerInstall to default location (you have to specify the build directory).
129*6236dae4SAndroid Build Coastguard Worker
130*6236dae4SAndroid Build Coastguard Worker    $ cmake --install ../curl-build
131*6236dae4SAndroid Build Coastguard Worker
132*6236dae4SAndroid Build Coastguard Worker### Fallback for CMake before version 3.15
133*6236dae4SAndroid Build Coastguard Worker
134*6236dae4SAndroid Build Coastguard WorkerCMake before version 3.15 does not support the `--install` option. In that
135*6236dae4SAndroid Build Coastguard Workercase, you have to `cd` to the build directory and use the building tool that
136*6236dae4SAndroid Build Coastguard Workercorresponds to the build files that CMake generated for you. This example
137*6236dae4SAndroid Build Coastguard Workerassumes that CMake generates `Makefile`:
138*6236dae4SAndroid Build Coastguard Worker
139*6236dae4SAndroid Build Coastguard Worker    $ cd ../curl-build
140*6236dae4SAndroid Build Coastguard Worker    $ make install
141*6236dae4SAndroid Build Coastguard Worker
142*6236dae4SAndroid Build Coastguard Worker# CMake build options
143*6236dae4SAndroid Build Coastguard Worker
144*6236dae4SAndroid Build Coastguard Worker- `BUILD_CURL_EXE`:                         Build curl executable. Default: `ON`
145*6236dae4SAndroid Build Coastguard Worker- `BUILD_EXAMPLES`:                         Build libcurl examples. Default: `ON`
146*6236dae4SAndroid Build Coastguard Worker- `BUILD_LIBCURL_DOCS`:                     Build libcurl man pages. Default: `ON`
147*6236dae4SAndroid Build Coastguard Worker- `BUILD_MISC_DOCS`:                        Build misc man pages (e.g. `curl-config` and `mk-ca-bundle`). Default: `ON`
148*6236dae4SAndroid Build Coastguard Worker- `BUILD_SHARED_LIBS`:                      Build shared libraries. Default: `ON`
149*6236dae4SAndroid Build Coastguard Worker- `BUILD_STATIC_CURL`:                      Build curl executable with static libcurl. Default: `OFF`
150*6236dae4SAndroid Build Coastguard Worker- `BUILD_STATIC_LIBS`:                      Build static libraries. Default: `OFF`
151*6236dae4SAndroid Build Coastguard Worker- `BUILD_TESTING`:                          Build tests. Default: `ON`
152*6236dae4SAndroid Build Coastguard Worker- `CURL_DEFAULT_SSL_BACKEND`:               Override default TLS backend in MultiSSL builds.
153*6236dae4SAndroid Build Coastguard Worker                                            Accepted values in order of default priority:
154*6236dae4SAndroid Build Coastguard Worker                                            `wolfssl`, `gnutls`, `mbedtls`, `openssl`, `secure-transport`, `schannel`, `bearssl`, `rustls`
155*6236dae4SAndroid Build Coastguard Worker- `CURL_ENABLE_EXPORT_TARGET`:              Enable CMake export target. Default: `ON`
156*6236dae4SAndroid Build Coastguard Worker- `CURL_HIDDEN_SYMBOLS`:                    Hide libcurl internal symbols (=hide all symbols that are not officially external). Default: `ON`
157*6236dae4SAndroid Build Coastguard Worker- `CURL_LIBCURL_SOVERSION`:                 Enable libcurl SOVERSION. Default: `ON` for supported platforms
158*6236dae4SAndroid Build Coastguard Worker- `CURL_LIBCURL_VERSIONED_SYMBOLS`:         Enable libcurl versioned symbols. Default: `OFF`
159*6236dae4SAndroid Build Coastguard Worker- `CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX`:  Override default versioned symbol prefix. Default: `<TLS-BACKEND>_` or `MULTISSL_`
160*6236dae4SAndroid Build Coastguard Worker- `CURL_LTO`:                               Enable compiler Link Time Optimizations. Default: `OFF`
161*6236dae4SAndroid Build Coastguard Worker- `CURL_STATIC_CRT`:                        Build libcurl with static CRT with MSVC (`/MT`). Default: `OFF`
162*6236dae4SAndroid Build Coastguard Worker- `CURL_TARGET_WINDOWS_VERSION`:            Minimum target Windows version as hex string.
163*6236dae4SAndroid Build Coastguard Worker- `CURL_TEST_BUNDLES`:                      Bundle `libtest` and `unittest` tests into single binaries. Default: `OFF`
164*6236dae4SAndroid Build Coastguard Worker- `CURL_WERROR`:                            Turn compiler warnings into errors. Default: `OFF`
165*6236dae4SAndroid Build Coastguard Worker- `ENABLE_CURLDEBUG`:                       Enable TrackMemory debug feature: Default: =`ENABLE_DEBUG`
166*6236dae4SAndroid Build Coastguard Worker- `ENABLE_CURL_MANUAL`:                     Build the man page for curl and enable its `-M`/`--manual` option. Default: `ON`
167*6236dae4SAndroid Build Coastguard Worker- `ENABLE_DEBUG`:                           Enable curl debug features (for developing curl itself). Default: `OFF`
168*6236dae4SAndroid Build Coastguard Worker- `IMPORT_LIB_SUFFIX`:                      Import library suffix. Default: `_imp`
169*6236dae4SAndroid Build Coastguard Worker- `LIBCURL_OUTPUT_NAME`:                    Basename of the curl library. Default: `libcurl`
170*6236dae4SAndroid Build Coastguard Worker- `PICKY_COMPILER`:                         Enable picky compiler options. Default: `ON`
171*6236dae4SAndroid Build Coastguard Worker- `STATIC_LIB_SUFFIX`:                      Static library suffix. Default: (empty)
172*6236dae4SAndroid Build Coastguard Worker
173*6236dae4SAndroid Build Coastguard Worker## CA bundle options
174*6236dae4SAndroid Build Coastguard Worker
175*6236dae4SAndroid Build Coastguard Worker- `CURL_CA_BUNDLE`:                         Path to the CA bundle. Set `none` to disable or `auto` for auto-detection. Default: `auto`
176*6236dae4SAndroid Build Coastguard Worker- `CURL_CA_EMBED`:                          Path to the CA bundle to embed in the curl tool. Default: (disabled)
177*6236dae4SAndroid Build Coastguard Worker- `CURL_CA_FALLBACK`:                       Use built-in CA store of TLS backend. Default: `OFF`
178*6236dae4SAndroid Build Coastguard Worker- `CURL_CA_PATH`:                           Location of default CA path. Set `none` to disable or `auto` for auto-detection. Default: `auto`
179*6236dae4SAndroid Build Coastguard Worker- `CURL_CA_SEARCH_SAFE`:                    Enable safe CA bundle search (within the curl tool directory) on Windows. Default: `OFF`
180*6236dae4SAndroid Build Coastguard Worker
181*6236dae4SAndroid Build Coastguard Worker## Enabling features
182*6236dae4SAndroid Build Coastguard Worker
183*6236dae4SAndroid Build Coastguard Worker- `CURL_ENABLE_SSL`:                        Enable SSL support. Default: `ON`
184*6236dae4SAndroid Build Coastguard Worker- `CURL_WINDOWS_SSPI`:                      Enable SSPI on Windows. Default: =`CURL_USE_SCHANNEL`
185*6236dae4SAndroid Build Coastguard Worker- `ENABLE_IPV6`:                            Enable IPv6 support. Default: `ON`
186*6236dae4SAndroid Build Coastguard Worker- `ENABLE_THREADED_RESOLVER`:               Enable threaded DNS lookup. Default: `ON` if c-ares is not enabled
187*6236dae4SAndroid Build Coastguard Worker- `ENABLE_UNICODE`:                         Use the Unicode version of the Windows API functions. Default: `OFF`
188*6236dae4SAndroid Build Coastguard Worker- `ENABLE_UNIX_SOCKETS`:                    Enable Unix domain sockets support. Default: `ON`
189*6236dae4SAndroid Build Coastguard Worker- `USE_ECH`:                                Enable ECH support. Default: `OFF`
190*6236dae4SAndroid Build Coastguard Worker- `USE_HTTPSRR`:                            Enable HTTPS RR support for ECH (experimental). Default: `OFF`
191*6236dae4SAndroid Build Coastguard Worker- `USE_OPENSSL_QUIC`:                       Use OpenSSL and nghttp3 libraries for HTTP/3 support. Default: `OFF`
192*6236dae4SAndroid Build Coastguard Worker
193*6236dae4SAndroid Build Coastguard Worker## Disabling features
194*6236dae4SAndroid Build Coastguard Worker
195*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_ALTSVC`:                    Disable alt-svc support. Default: `OFF`
196*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_AWS`:                       Disable **aws-sigv4**. Default: `OFF`
197*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_BASIC_AUTH`:                Disable Basic authentication. Default: `OFF`
198*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_BEARER_AUTH`:               Disable Bearer authentication. Default: `OFF`
199*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_BINDLOCAL`:                 Disable local binding support. Default: `OFF`
200*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_CA_SEARCH`:                 Disable unsafe CA bundle search in PATH on Windows. Default: `OFF`
201*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_COOKIES`:                   Disable cookies support. Default: `OFF`
202*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_DICT`:                      Disable DICT. Default: `OFF`
203*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_DIGEST_AUTH`:               Disable Digest authentication. Default: `OFF`
204*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_DOH`:                       Disable DNS-over-HTTPS. Default: `OFF`
205*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_FILE`:                      Disable FILE. Default: `OFF`
206*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_FORM_API`:                  Disable **form-api**: Default: =`CURL_DISABLE_MIME`
207*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_FTP`:                       Disable FTP. Default: `OFF`
208*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_GETOPTIONS`:                Disable `curl_easy_options` API for existing options to `curl_easy_setopt`. Default: `OFF`
209*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_GOPHER`:                    Disable Gopher. Default: `OFF`
210*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_HEADERS_API`:               Disable **headers-api** support. Default: `OFF`
211*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_HSTS`:                      Disable HSTS support. Default: `OFF`
212*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_HTTP`:                      Disable HTTP. Default: `OFF`
213*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_HTTP_AUTH`:                 Disable all HTTP authentication methods. Default: `OFF`
214*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_IMAP`:                      Disable IMAP. Default: `OFF`
215*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_INSTALL`:                   Disable installation targets. Default: `OFF`
216*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_IPFS`:                      Disable IPFS. Default: `OFF`
217*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_KERBEROS_AUTH`:             Disable Kerberos authentication. Default: `OFF`
218*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_LDAP`:                      Disable LDAP. Default: `OFF`
219*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_LDAPS`:                     Disable LDAPS. Default: =`CURL_DISABLE_LDAP`
220*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_LIBCURL_OPTION`:            Disable `--libcurl` option from the curl tool. Default: `OFF`
221*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_MIME`:                      Disable MIME support. Default: `OFF`
222*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_MQTT`:                      Disable MQTT. Default: `OFF`
223*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_NEGOTIATE_AUTH`:            Disable negotiate authentication. Default: `OFF`
224*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_NETRC`:                     Disable netrc parser. Default: `OFF`
225*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_NTLM`:                      Disable NTLM support. Default: `OFF`
226*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG`:  Disable automatic loading of OpenSSL configuration. Default: `OFF`
227*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_PARSEDATE`:                 Disable date parsing. Default: `OFF`
228*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_POP3`:                      Disable POP3. Default: `OFF`
229*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_PROGRESS_METER`:            Disable built-in progress meter. Default: `OFF`
230*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_PROXY`:                     Disable proxy support. Default: `OFF`
231*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_RTSP`:                      Disable RTSP. Default: `OFF`
232*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_SHA512_256`:                Disable SHA-512/256 hash algorithm. Default: `OFF`
233*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_SHUFFLE_DNS`:               Disable shuffle DNS feature. Default: `OFF`
234*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_SMB`:                       Disable SMB. Default: `OFF`
235*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_SMTP`:                      Disable SMTP. Default: `OFF`
236*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_SOCKETPAIR`:                Disable use of socketpair for curl_multi_poll. Default: `OFF`
237*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_SRP`:                       Disable TLS-SRP support. Default: `OFF`
238*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_TELNET`:                    Disable Telnet. Default: `OFF`
239*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_TFTP`:                      Disable TFTP. Default: `OFF`
240*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_VERBOSE_STRINGS`:           Disable verbose strings. Default: `OFF`
241*6236dae4SAndroid Build Coastguard Worker- `CURL_DISABLE_WEBSOCKETS`:                Disable WebSocket. Default: `OFF`
242*6236dae4SAndroid Build Coastguard Worker- `HTTP_ONLY`:                              Disable all protocols except HTTP (This overrides all `CURL_DISABLE_*` options). Default: `OFF`
243*6236dae4SAndroid Build Coastguard Worker
244*6236dae4SAndroid Build Coastguard Worker## Environment
245*6236dae4SAndroid Build Coastguard Worker
246*6236dae4SAndroid Build Coastguard Worker- `CI`:                                     Assume running under CI if set.
247*6236dae4SAndroid Build Coastguard Worker- `CURL_BUILDINFO`:                         Print `buildinfo.txt` if set.
248*6236dae4SAndroid Build Coastguard Worker- `CURL_CI`:                                Assume running under CI if set.
249*6236dae4SAndroid Build Coastguard Worker
250*6236dae4SAndroid Build Coastguard Worker## CMake options
251*6236dae4SAndroid Build Coastguard Worker
252*6236dae4SAndroid Build Coastguard Worker- `CMAKE_DEBUG_POSTFIX`:                    Default: `-d`
253*6236dae4SAndroid Build Coastguard Worker- `CMAKE_IMPORT_LIBRARY_SUFFIX`             (see CMake)
254*6236dae4SAndroid Build Coastguard Worker- `CMAKE_INSTALL_BINDIR`                    (see CMake)
255*6236dae4SAndroid Build Coastguard Worker- `CMAKE_INSTALL_INCLUDEDIR`                (see CMake)
256*6236dae4SAndroid Build Coastguard Worker- `CMAKE_INSTALL_LIBDIR`                    (see CMake)
257*6236dae4SAndroid Build Coastguard Worker- `CMAKE_INSTALL_PREFIX`                    (see CMake)
258*6236dae4SAndroid Build Coastguard Worker- `CMAKE_STATIC_LIBRARY_SUFFIX`             (see CMake)
259*6236dae4SAndroid Build Coastguard Worker- `CMAKE_UNITY_BUILD_BATCH_SIZE`:           Set the number of sources in a "unity" unit. Default: `0` (all)
260*6236dae4SAndroid Build Coastguard Worker- `CMAKE_UNITY_BUILD`:                      Enable "unity" (aka jumbo) builds. Default: `OFF`
261*6236dae4SAndroid Build Coastguard Worker
262*6236dae4SAndroid Build Coastguard WorkerDetails via CMake
263*6236dae4SAndroid Build Coastguard Worker[variables](https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html) and
264*6236dae4SAndroid Build Coastguard Worker[install directories](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html).
265*6236dae4SAndroid Build Coastguard Worker
266*6236dae4SAndroid Build Coastguard Worker## Dependencies
267*6236dae4SAndroid Build Coastguard Worker
268*6236dae4SAndroid Build Coastguard Worker- `CURL_BROTLI`:                            Use brotli. Default: `OFF`
269*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_BEARSSL`:                       Enable BearSSL for SSL/TLS. Default: `OFF`
270*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_GNUTLS`:                        Enable GnuTLS for SSL/TLS. Default: `OFF`
271*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_GSASL`:                         Use libgsasl. Default: `OFF`
272*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_GSSAPI`:                        Use GSSAPI implementation. Default: `OFF`
273*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_LIBPSL`:                        Use libpsl. Default: `ON`
274*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_LIBSSH2`:                       Use libssh2. Default: `ON`
275*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_LIBSSH`:                        Use libssh. Default: `OFF`
276*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_LIBUV`:                         Use libuv for event-based tests. Default: `OFF`
277*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_MBEDTLS`:                       Enable mbedTLS for SSL/TLS. Default: `OFF`
278*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_OPENSSL`:                       Enable OpenSSL for SSL/TLS. Default: `ON` if no other TLS backend was enabled.
279*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_PKGCONFIG`:                     Enable `pkg-config` to detect dependencies. Default: `ON` for Unix, vcpkg, MinGW if not cross-compiling.
280*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_RUSTLS`:                        Enable Rustls for SSL/TLS. Default: `OFF`
281*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_SCHANNEL`:                      Enable Windows native SSL/TLS (Schannel). Default: `OFF`
282*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_SECTRANSP`:                     Enable Apple OS native SSL/TLS (Secure Transport). Default: `OFF`
283*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_WOLFSSH`:                       Use wolfSSH. Default: `OFF`
284*6236dae4SAndroid Build Coastguard Worker- `CURL_USE_WOLFSSL`:                       Enable wolfSSL for SSL/TLS. Default: `OFF`
285*6236dae4SAndroid Build Coastguard Worker- `CURL_ZLIB`:                              Use zlib (`ON`, `OFF` or `AUTO`). Default: `AUTO`
286*6236dae4SAndroid Build Coastguard Worker- `CURL_ZSTD`:                              Use zstd. Default: `OFF`
287*6236dae4SAndroid Build Coastguard Worker- `ENABLE_ARES`:                            Enable c-ares support. Default: `OFF`
288*6236dae4SAndroid Build Coastguard Worker- `USE_APPLE_IDN`:                          Use Apple built-in IDN support. Default: `OFF`
289*6236dae4SAndroid Build Coastguard Worker- `USE_LIBIDN2`:                            Use libidn2 for IDN support. Default: `ON`
290*6236dae4SAndroid Build Coastguard Worker- `USE_LIBRTMP`:                            Enable librtmp from rtmpdump. Default: `OFF`
291*6236dae4SAndroid Build Coastguard Worker- `USE_MSH3`:                               Use msh3/msquic library for HTTP/3 support. Default: `OFF`
292*6236dae4SAndroid Build Coastguard Worker- `USE_NGHTTP2`:                            Use nghttp2 library. Default: `ON`
293*6236dae4SAndroid Build Coastguard Worker- `USE_NGTCP2`:                             Use ngtcp2 and nghttp3 libraries for HTTP/3 support. Default: `OFF`
294*6236dae4SAndroid Build Coastguard Worker- `USE_QUICHE`:                             Use quiche library for HTTP/3 support. Default: `OFF`
295*6236dae4SAndroid Build Coastguard Worker- `USE_WIN32_IDN`:                          Use WinIDN for IDN support. Default: `OFF`
296*6236dae4SAndroid Build Coastguard Worker- `USE_WIN32_LDAP`:                         Use Windows LDAP implementation. Default: `ON`
297*6236dae4SAndroid Build Coastguard Worker
298*6236dae4SAndroid Build Coastguard Worker## Dependency options (via CMake)
299*6236dae4SAndroid Build Coastguard Worker
300*6236dae4SAndroid Build Coastguard Worker- `OPENSSL_ROOT_DIR`:                       Set this variable to the root installation of OpenSSL (and forks).
301*6236dae4SAndroid Build Coastguard Worker- `ZLIB_INCLUDE_DIR`:                       The zlib include directory.
302*6236dae4SAndroid Build Coastguard Worker- `ZLIB_LIBRARY`:                           Path to `zlib` library.
303*6236dae4SAndroid Build Coastguard Worker
304*6236dae4SAndroid Build Coastguard Worker## Dependency options
305*6236dae4SAndroid Build Coastguard Worker
306*6236dae4SAndroid Build Coastguard Worker- `PERL_EXECUTABLE`                         Perl binary used throughout the build and tests.
307*6236dae4SAndroid Build Coastguard Worker- `BEARSSL_INCLUDE_DIR`:                    The BearSSL include directory.
308*6236dae4SAndroid Build Coastguard Worker- `BEARSSL_LIBRARY`:                        Path to `bearssl` library.
309*6236dae4SAndroid Build Coastguard Worker- `BROTLI_INCLUDE_DIR`:                     The brotli include directory.
310*6236dae4SAndroid Build Coastguard Worker- `BROTLICOMMON_LIBRARY`:                   Path to `brotlicommon` library.
311*6236dae4SAndroid Build Coastguard Worker- `BROTLIDEC_LIBRARY`:                      Path to `brotlidec` library.
312*6236dae4SAndroid Build Coastguard Worker- `CARES_INCLUDE_DIR`:                      The c-ares include directory.
313*6236dae4SAndroid Build Coastguard Worker- `CARES_LIBRARY`:                          Path to `cares` library.
314*6236dae4SAndroid Build Coastguard Worker- `GSS_ROOT_DIR`:                           Set this variable to the root installation of GSS. (also supported as environment)
315*6236dae4SAndroid Build Coastguard Worker- `LDAP_LIBRARY`:                           Name or full path to `ldap` library. Default: `ldap`
316*6236dae4SAndroid Build Coastguard Worker- `LDAP_LBER_LIBRARY`:                      Name or full path to `lber` library. Default: `lber`
317*6236dae4SAndroid Build Coastguard Worker- `LDAP_INCLUDE_DIR`:                       Path to LDAP include directory.
318*6236dae4SAndroid Build Coastguard Worker- `LIBGSASL_INCLUDE_DIR`:                   The libgsasl include directory.
319*6236dae4SAndroid Build Coastguard Worker- `LIBGSASL_LIBRARY`:                       Path to `libgsasl` library.
320*6236dae4SAndroid Build Coastguard Worker- `LIBIDN2_INCLUDE_DIR`:                    The libidn2 include directory.
321*6236dae4SAndroid Build Coastguard Worker- `LIBIDN2_LIBRARY`:                        Path to `libidn2` library.
322*6236dae4SAndroid Build Coastguard Worker- `LIBPSL_INCLUDE_DIR`:                     The libpsl include directory.
323*6236dae4SAndroid Build Coastguard Worker- `LIBPSL_LIBRARY`:                         Path to `libpsl` library.
324*6236dae4SAndroid Build Coastguard Worker- `LIBSSH_INCLUDE_DIR`:                     The libssh include directory.
325*6236dae4SAndroid Build Coastguard Worker- `LIBSSH_LIBRARY`:                         Path to `libssh` library.
326*6236dae4SAndroid Build Coastguard Worker- `LIBSSH2_INCLUDE_DIR`:                    The libssh2 include directory.
327*6236dae4SAndroid Build Coastguard Worker- `LIBSSH2_LIBRARY`:                        Path to `libssh2` library.
328*6236dae4SAndroid Build Coastguard Worker- `LIBUV_INCLUDE_DIR`:                      The libuv include directory.
329*6236dae4SAndroid Build Coastguard Worker- `LIBUV_LIBRARY`:                          Path to `libuv` library.
330*6236dae4SAndroid Build Coastguard Worker- `MSH3_INCLUDE_DIR`:                       The msh3 include directory.
331*6236dae4SAndroid Build Coastguard Worker- `MSH3_LIBRARY`:                           Path to `msh3` library.
332*6236dae4SAndroid Build Coastguard Worker- `MBEDTLS_INCLUDE_DIR`:                    The mbedTLS include directory.
333*6236dae4SAndroid Build Coastguard Worker- `MBEDTLS_LIBRARY`:                        Path to `mbedtls` library.
334*6236dae4SAndroid Build Coastguard Worker- `MBEDX509_LIBRARY`:                       Path to `mbedx509` library.
335*6236dae4SAndroid Build Coastguard Worker- `MBEDCRYPTO_LIBRARY`:                     Path to `mbedcrypto` library.
336*6236dae4SAndroid Build Coastguard Worker- `NGHTTP2_INCLUDE_DIR`:                    The nghttp2 include directory.
337*6236dae4SAndroid Build Coastguard Worker- `NGHTTP2_LIBRARY`:                        Path to `nghttp2` library.
338*6236dae4SAndroid Build Coastguard Worker- `NGHTTP3_INCLUDE_DIR`:                    The nghttp3 include directory.
339*6236dae4SAndroid Build Coastguard Worker- `NGHTTP3_LIBRARY`:                        Path to `nghttp3` library.
340*6236dae4SAndroid Build Coastguard Worker- `NGTCP2_INCLUDE_DIR`:                     The ngtcp2 include directory.
341*6236dae4SAndroid Build Coastguard Worker- `NGTCP2_LIBRARY`:                         Path to `ngtcp2` library.
342*6236dae4SAndroid Build Coastguard Worker- `NETTLE_INCLUDE_DIR`:                     The nettle include directory.
343*6236dae4SAndroid Build Coastguard Worker- `NETTLE_LIBRARY`:                         Path to `nettle` library.
344*6236dae4SAndroid Build Coastguard Worker- `QUICHE_INCLUDE_DIR`:                     The quiche include directory.
345*6236dae4SAndroid Build Coastguard Worker- `QUICHE_LIBRARY`:                         Path to `quiche` library.
346*6236dae4SAndroid Build Coastguard Worker- `RUSTLS_INCLUDE_DIR`:                     The Rustls include directory.
347*6236dae4SAndroid Build Coastguard Worker- `RUSTLS_LIBRARY`:                         Path to `rustls` library.
348*6236dae4SAndroid Build Coastguard Worker- `WOLFSSH_INCLUDE_DIR`:                    The wolfSSH include directory.
349*6236dae4SAndroid Build Coastguard Worker- `WOLFSSH_LIBRARY`:                        Path to `wolfssh` library.
350*6236dae4SAndroid Build Coastguard Worker- `WOLFSSL_INCLUDE_DIR`:                    The wolfSSL include directory.
351*6236dae4SAndroid Build Coastguard Worker- `WOLFSSL_LIBRARY`:                        Path to `wolfssl` library.
352*6236dae4SAndroid Build Coastguard Worker- `ZSTD_INCLUDE_DIR`:                       The zstd include directory.
353*6236dae4SAndroid Build Coastguard Worker- `ZSTD_LIBRARY`:                           Path to `zstd` library.
354*6236dae4SAndroid Build Coastguard Worker
355*6236dae4SAndroid Build Coastguard Worker## Test tools
356*6236dae4SAndroid Build Coastguard Worker
357*6236dae4SAndroid Build Coastguard Worker- `APACHECTL`:                              Default: `apache2ctl`
358*6236dae4SAndroid Build Coastguard Worker- `APXS`:                                   Default: `apxs`
359*6236dae4SAndroid Build Coastguard Worker- `CADDY`:                                  Default: `caddy`
360*6236dae4SAndroid Build Coastguard Worker- `HTTPD_NGHTTPX`:                          Default: `nghttpx`
361*6236dae4SAndroid Build Coastguard Worker- `HTTPD`:                                  Default: `apache2`
362*6236dae4SAndroid Build Coastguard Worker- `TEST_NGHTTPX`:                           Default: `nghttpx`
363*6236dae4SAndroid Build Coastguard Worker- `VSFTPD`:                                 Default: `vsftps`
364