-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: migrate dependency detections to Find modules #14555
Conversation
1397916
to
7be485f
Compare
Maybe in other PR we can have krb5 and it version? |
Version detection already works with krb5, or did you mean something else?: |
I meant that it will be in here. |
That a good a nice step. I like it! |
Ah, got it, to the |
39dd972
to
bd0c897
Compare
150a8ae
to
3190ee2
Compare
I think is very important, because now when I got curl from ubuntu, I don't know which library was compile to get gsasl-api feature, and what the version it there. If users know, they can easly report to ubuntu (or other distro) or get decision if to use that curl. |
Do you mean to split FindGSS into FindHeimdal and Findkrb5, or? |
If it already happen in FindGSS that is good, and not need to change. |
I see that file now, and that is a good direction. In the future, if we see that the logic is large in FindGSS, we can think to split. Maybe it will be more easy to handle? |
It does. They are certainly not over-tested, so more tests and reports are welcome. |
b8cd6b9
to
b3d0977
Compare
Also re-sort Makefile.am list.
…nfig detections Making the call doesn't give anything useful. The only difference is that it will defined the `<original_case>_FOUND` variable over the fully uppercase version. And also omits the standard 'Found' log messages. On the other hand it will show a misleading error message when the dependency is not found, but saying that the `_INCLUDE_DIRS` and `_LIBRARIES` vars are missing, while in fact we use `_INCLUDE_DIR` and `_LIBRARY` for that. Re-add the log message manually for pkg-config detections to smoothen out that difference.
17fe64c
to
556263d
Compare
Drop `find_package(libssh CONFIG)` detection method in favour of the Find module that supports both `pkg-config`, and CMake-native (since #14555) detection. This aligns `libssh` detection with other dependencies. It makes the build honor custom configuration via `LIBSSH_INCLUDE_DIR`, `LIBSSH_LIBRARY`. Also enable libssh in a GHA/macos cmake job for build coverage. Fixing: - curl-for-win requiring a hack to configure libssh: https://github.com/curl/curl-for-win/blob/4f9acbed92fd4aac0e874c9a591bec7d621cd9f2/curl.sh#L255-L263 - after #14555, GHA/windows gnutls vcpkg job no longer auto-detected libssh, due to a regression missing to enable libssh when found via `find_package(libssh CONFIG)`. Ref: https://github.com/curl/curl/actions/runs/10470138955/job/28994650338 Follow-up to 422696f #14555 Closes #14614
For: libgsasl, libidn2, libssh, libuv.
The new Find modules retain using
pkg-config
natively, not as a "hint"for the CMake-native detection. Of the pre-existing Find modules, only
FindNettle, and FindGSS (with customized code) work this way. Align
detection code for the new modules and add version detection for the
CMake-native paths.
Also, add CMake-native detection for
libgsasl
.The remaining outlier in
CMakeLists.txt
is GnuTLS, which hasa CMake built-in Find module, but which lacks
pkg-config
support,required for vcpkg. It remains unchanged.
Another part-outlier is
libssh
, which keeps requiring the trickfind_package(libssh CONFIG QUIET)
for reasons I could not yet figureout.
pkg-config
if custom config is set via<NAME>_INCLUDE_DIR
/<NAME>_LIBRARY
? (Separate PR?)if(EXISTS)
, more flexible regexp and synced var names. → cmake: sync up version detection in Find modules #14572