-
-
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: allow pkg-config
in more envs
#14483
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why not msvc? |
vszakats
force-pushed
the
cm-pkg-config-non-unix
branch
from
August 10, 2024 08:16
17bc50c
to
a1b4ab1
Compare
I don't familiar with more. |
MarcelRaad
approved these changes
Aug 10, 2024
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Aug 12, 2024
Add option to control whether to use `pkg-config` to detect dependencies. Curl's CMake uses `pkg-config` by default for all targets except for MSVC without vcpkg. With the CMake option `-DCURL_USE_PKGCONFIG=ON` you can override it to use `pkg-config` always. If `pkg-config` is causing issues, e.g. in cross-builds or other cases, `-DCURL_USE_PKGCONFIG=OFF` disables all use of `pkg-config`. Follow-up to 9dfdc6f curl#14483 Closes #xxxxx
vszakats
added a commit
that referenced
this pull request
Aug 13, 2024
Add option to control whether to use `pkg-config` to detect dependencies. Curl's CMake uses `pkg-config` by default for all targets except for MSVC without vcpkg. With the CMake option `-DCURL_USE_PKGCONFIG=ON` you can override it to use `pkg-config` always. If `pkg-config` is causing issues, e.g. in cross-builds or other cases, `-DCURL_USE_PKGCONFIG=OFF` disables all use of `pkg-config`. Also add it to `curl-config.cmake`. Not yet used, but will be once curl starts referencing any curl-specific `Find*` module from this public script. Follow-up to 9dfdc6f #14483 Closes #14504
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this patch,
pkg-config
was used forUNIX
builds only (witha few exceptions like wolfSSL, libssh, gsasl, libuv). This patch extends
pkg-config
use to all envs except:MSVC
without vcpkg. Meaning MSVCwith vcpkg will now use it. Also mingw on Windows.
Also apply the new condition to options where
pkg-config
was usedunconditionally (= for all targets). These are:
-DCURL_USE_WOLFSSL=ON
,-DCURL_USE_LIBSSH=ON
,-DCURL_USE_GSASL=ON
and-DCURL_USE_LIBUV=ON
This patch may still cause regressions for cross-builds (e.g. mingw
cross-build from Unix) and potentially other cases. If that happens, we
recommend using some of these methods to explicitly disable
pkg-config
when using CMake:
-DPKG_CONFIG_EXECUTABLE=
(or
-DPKG_CONFIG_EXECUTABLE=nonexistent
or similar)This is similar to the (curl-specific)
PKG_CONFIG
env for autotools.PKG_CONFIG_LIBDIR=
(or
PKG_CONFIG_PATH
,PKG_CONFIG_SYSROOT_DIR
,or the CMake-specific
PKG_CONFIG
)We may improve control over this in a future patch, also allowing opting
in MSVC (without vcpkg).
Ref: #14405
Ref: #14408
Ref: #14140
Closes #14483
if(UNIX)
is used.CURL_USE_WOLFSSL
,CURL_USE_LIBSSH
,CURL_USE_GSASL
,CURL_USE_LIBUV
.CURL_USE_PKGCONFIG
setting. → cmake: addCURL_USE_PKGCONFIG
option #14504pkg-config
support for deps which don't have it yet.Without whitespace: https://github.com/curl/curl/pull/14483/files?w=1