-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
cmake: limit pkg-config
to UNIX and MSVC+vcpkg by default
#14575
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
Conversation
I agree. Let's hear more people opinion. |
/cc @lazka |
I can only speak for MSYS2/MINGW, and using pkg-config there shouldn't be a problem. We've only switched away from autotools a few months ago, so we were using pkg-config before that. But cmake is also fine, as long as it builds :) |
Thanks! I've seen you've switched to CMake :) This is still about CMake, and whether or not to allow looking up dependencies via |
I just did a rebuild of current master with CURL_USE_PKGCONFIG=ON with our configs for openssl/gnutls/schannel, and all looks good. |
Thank you @lazka! |
Enable `CURL_USE_PKGCONFIG` by default for more environments: - for `MINGW` targets when not using cross-compilation. - stop restricting vcpkg to MSVC. (this currently unlocks mingw, also unlocked by the update above.) Also: - cache `CURL_USE_PKGCONFIG` in `CURLConfig.cmake`. Suggested-by: Kai Pastor Follow-up to c555ab4 #14575 Closes #14658
Enable `CURL_USE_PKGCONFIG` by default for MinGW cross-builds. Note: This may cause fallouts in certain envs where pkg-config picks up native packages. Follow-up to e1ab01d curl#14658 Follow-up to c555ab4 curl#14575
Enable `CURL_USE_PKGCONFIG` by default for more environments: - for `MINGW` targets when not using cross-compilation. - stop restricting vcpkg to MSVC. (this currently unlocks mingw, also unlocked by the update above.) Also: - cache `CURL_USE_PKGCONFIG` in `CURLConfig.cmake`. Suggested-by: Kai Pastor Follow-up to c555ab4 curl#14575 Closes curl#14658
Enable `CURL_USE_PKGCONFIG` by default for MinGW cross-builds. Note: This may cause fallouts in certain envs where `pkg-config` picks up native packages. Follow-up to e1ab01d curl#14658 Follow-up to c555ab4 curl#14575 Closes curl#15005
Limit
pkg-config
to UNIX and MSVC with vcpkg, by default. Compared tocurl 8.9.1, this unlocks
pkg-config
on MSVC with vcpkg.This condition might be updated in the future depending on where
pkg-config
can be useful without breaking things. (e.g. to non-crossMINGW, or all MINGW).
In the meantime everyone is free to override the default and test their
build with
pkg-config
by setting theCURL_USE_PKGCONFIG=ON
CMakeoption.
Peeking into CMake's built-in Find modules: Around 10% support
pkg-config
, some limited toUNIX
, some guarded with package-specificflags, some unguarded:
Though we tested the waters in 8.9.1 via the libidn2 dependency (
ON
by default withpkg-config
), I'm still concerned that unlockingpkg-config
almost everywhere (for alldependencies this time) might be overshooting the target, causing fallouts and manual
opt-out in more cases than ideal.
I also reckon that there has been a lot of changes already around CMake in this release cycle,
so unlocking
pkg-config
now may be too much to handle at once.Thus, this PR limits
pkg-config
to UNIX and MSVC with vcpkg, by default. Compared to8.9.1, this unlocks
pkg-config
on MSVC with vcpkg.Nobody has been publicly complaining about missing
pkg-config
on their platform.If anyone does, or we have a future release with fewer changes all around, we might
unlock this by default for more targets (e.g. non-cross MINGW, or all MINGW).
In the meantime everyone is free to override the default and test their build with
pkg-config
by setting theCURL_USE_PKGCONFIG=ON
CMake option.Let me know what you think!
edit:
pkg-config
support does not break curl under MSYS/MINGW. Ref: #14575 (comment)