This patch adds the ability to build a static and shared libcurl library in a single build session. It also adds an option to select which one to use when building the curl executable. New build options: - `BUILD_STATIC_LIBS`. Default: `OFF`. Enabled automatically if `BUILD_SHARED_LIBS` is `OFF`. - `BUILD_STATIC_CURL`. Default: `OFF`. Requires `BUILD_STATIC_LIBS` enabled. Enabled automatically if building static libcurl only. - `STATIC_LIB_SUFFIX`. Default: empty. - `IMPORT_LIB_SUFFIX`. Default: `_imp` if implib filename would collide with static lib name (typically with MSVC) in Windows builds. Otherwise empty. Also: - Stop setting the `CURL_STATICLIB` macro via `curl_config.h`, and pass it directly to the compiler. This also allows to delete a condition from `tests/server/CMakeLists.txt`. - Complete a TODO by following the logic used in autotools (also for `LIBCURL_NO_SHARED`), and set `-DCURL_STATICLIB` in `Cflags:` of `libcurl.pc` for _static-only_ curl builds. - Convert an existing CI test to build both shared and static libcurl. Closes #11505 |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| base64.pl | ||
| CMakeLists.txt | ||
| disabled.c | ||
| fake_ntlm.c | ||
| getpart.c | ||
| getpart.h | ||
| Makefile.am | ||
| Makefile.inc | ||
| mqttd.c | ||
| resolve.c | ||
| rtspd.c | ||
| server_setup.h | ||
| server_sockaddr.h | ||
| sockfilt.c | ||
| socksd.c | ||
| sws.c | ||
| testpart.c | ||
| tftp.h | ||
| tftpd.c | ||
| util.c | ||
| util.h | ||