curl/tests/server
Viktor Szakats 1199308dbc
cmake: support building static and shared libcurl in one go
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
2023-07-29 00:40:01 +00:00
..
.gitignore copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
base64.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
CMakeLists.txt cmake: support building static and shared libcurl in one go 2023-07-29 00:40:01 +00:00
disabled.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
fake_ntlm.c tests: fix fake_ntlm to run with a dynamic log directory 2023-03-30 09:53:57 -07:00
getpart.c server/getpart: clear the buffer before load 2023-03-23 14:46:07 +01:00
getpart.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.am copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.inc copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
mqttd.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
resolve.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
rtspd.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
server_setup.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
server_sockaddr.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
sockfilt.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
socksd.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
sws.c runtests: rename server command file 2023-06-19 17:14:27 -07:00
testpart.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tftp.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tftpd.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
util.c tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00
util.h tests: fix error messages & handling around sockets 2023-06-09 15:05:19 -07:00