]> git.ipfire.org Git - thirdparty/curl.git/commit
build: fix libcurltool with cmake and tunits, related tidy-ups
authorViktor Szakats <commit@vsz.me>
Mon, 23 Jun 2025 21:29:59 +0000 (23:29 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 25 Jun 2025 07:57:06 +0000 (09:57 +0200)
commitf4649425f2d4a7bef1ce628f2450ee2a4477a06e
tree8cd3442d40f2787b04a9e8979bc035b3c7b2524e
parent1ec0da014974aa0fad6c4e4b600810ac203bd5ce
build: fix libcurltool with cmake and tunits, related tidy-ups

Sync how libcurltool is built in different modes and build systems.

cmake:
- build libcurltool with curlx when building shared libcurl.
  To make it possible to use standard libcurl when linking tunits.
  Also syncing this with autotools.
  The remaining difference is that cmake allows to select shared or
  static for curl tool and tests/examples independently.
- fix to link with libcurl instead of libcurlu.
  To sync with autotools and to link with the standard libcurl for
  tool unit tests.
- fix `source_group()` to always include curlx sources.
- add missing 'curlx header files' source group.

autotools:
- build libcurltool without curlx when building static libcurl in
  non-unity builds.
  To avoid double compilation, just to be thrown away at link time.
  Also to sync with unity builds.

both:
- sync source order between autotools and cmake.
- make sure to pass all headers with both autotools and cmake.
  This is a no-op with cmake. Maybe a future patch should make sure
  to not pass those to remove that noise.

Ref: #17696

Closes #17727
src/CMakeLists.txt
src/Makefile.am
src/Makefile.inc
tests/tunit/CMakeLists.txt