mirror of
https://github.com/curl/curl.git
synced 2026-04-14 00:51:42 +08:00
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 |
||
|---|---|---|
| .. | ||
| ISSUE_TEMPLATE | ||
| scripts | ||
| workflows | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| dependabot.yml | ||
| FUNDING.yml | ||
| labeler.yml | ||
| lock.yml | ||
| stale.yml | ||