curl/.github
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
..
ISSUE_TEMPLATE bug_report: use issue forms instead of markdown template 2023-07-21 13:59:10 +02:00
scripts libcurl-ws.3. WebSocket API overview 2023-06-14 13:14:57 +02:00
workflows cmake: support building static and shared libcurl in one go 2023-07-29 00:40:01 +00:00
CODEOWNERS CODEOWNERS: remove the peeps mentioned as CI owners 2023-02-02 08:42:29 +01:00
CONTRIBUTING.md copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
FUNDING.yml copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
labeler.yml CI: adjust labeler match patterns 2023-04-24 20:46:09 -07:00
lock.yml copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
stale.yml copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00