curl-curl/.github/workflows
Viktor Szakats 91e06fde1b
cmake: fix building with CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
This CMake global custom option tells it to find dependencies as cmake
Configs first, and only then look for `Find*` modules. This may result
in `find_package()` succeeding, but without actually creating `CURL::*`
imported targets the curl build scripts are expecting.

For dependencies with curl-specific, local, `Find*` modules, we always
want to use them, via the module detection method, and never a
Config-based detection. Ensure this by passing the `MODULE` option to
`find_package()` and `find_dependency()` to make them use `Find*`
modules unconditionally, making them work as expected with the
`CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON` option set.

curl uses local Find modules for all dependencies except OpenSSL and
ZLIB. The latter two keep using either CMake's built-in Find modules or
Config method as before this patch.

Also:

- apply the same change to `curl-config.cmake`. To fix consuming curl
  with this option set.
  Authored-by: Valerie Snyder
  Ref: #20764
  Follow-up to 16f073ef49 #16973

- GHA/distcheck: add a job testing both building and consuming curl with
  this option set. (takes 15 seconds)
  Use custom NGHTTP2 configuration for an extra twist (not required
  to trigger this issue.)
  Follow-up to fcde8d7e37 #20773

Reported-by: Valerie Snyder
Fixes #20729

Closes #20784
2026-03-03 16:33:21 +01:00
..
appveyor-status.yml GHA: switch 12 Linux jobs to arm64 2026-01-09 19:35:16 +01:00
checkdocs.yml GHA: bump GHA and pip dependencies 2026-02-01 16:40:37 +01:00
checksrc.yml GHA: bump GHA and pip dependencies 2026-02-01 16:40:37 +01:00
checkurls.yml GHA: bump GHA and pip dependencies 2026-02-01 16:40:37 +01:00
codeql.yml GHA: bump actions and pip dependencies 2026-03-01 19:06:39 +01:00
configure-vs-cmake.yml GHA: bump GHA and pip dependencies 2026-02-01 16:40:37 +01:00
curl-for-win.yml GHA: bump GHA and pip dependencies 2026-02-01 16:40:37 +01:00
distcheck.yml cmake: fix building with CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON 2026-03-03 16:33:21 +01:00
fuzz.yml GHA: silence fresh zizmor 1.21.0 warnings 2026-01-16 13:48:28 +01:00
http3-linux.yml GHA: bump actions and pip dependencies 2026-03-01 19:06:39 +01:00
label.yml GHA: use ubuntu-slim image in 3 jobs 2026-01-25 18:54:12 +01:00
linux-old.yml GHA/linux-old: use tilde where possible and consistent 2026-02-05 13:12:10 +01:00
linux.yml GHA: bump actions and pip dependencies 2026-03-01 19:06:39 +01:00
macos.yml GHA: bump actions and pip dependencies 2026-03-01 19:06:39 +01:00
non-native.yml GHA: bump actions and pip dependencies 2026-03-01 19:06:39 +01:00
windows.yml GHA: bump actions and pip dependencies 2026-03-01 19:06:39 +01:00