Repository navigation
Conversation
vszakats
marked this pull request as draft
August 10, 2024 07:36
Contributor
|
Why not msvc? |
Member
Author
vszakats
force-pushed
the
cm-pkg-config-non-unix
branch
from
August 10, 2024 08:16
17bc50c to
a1b4ab1
Compare
Contributor
I don't familiar with more. |
MarcelRaad
approved these changes
Aug 10, 2024
vszakats
marked this pull request as ready for review
August 12, 2024 12:25
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
This file contains hidden or 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
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-configwas used forUNIXbuilds only (witha few exceptions like wolfSSL, libssh, gsasl, libuv). This patch extends
pkg-configuse to all envs except:MSVCwithout vcpkg. Meaning MSVCwith vcpkg will now use it. Also mingw on Windows.
Also apply the new condition to options where
pkg-configwas usedunconditionally (= for all targets). These are:
-DCURL_USE_WOLFSSL=ON,-DCURL_USE_LIBSSH=ON,-DCURL_USE_GSASL=ONand-DCURL_USE_LIBUV=ONThis 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-configwhen using CMake:
-DPKG_CONFIG_EXECUTABLE=(or
-DPKG_CONFIG_EXECUTABLE=nonexistentor similar)This is similar to the (curl-specific)
PKG_CONFIGenv 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_PKGCONFIGsetting. → cmake: addCURL_USE_PKGCONFIGoption #14504pkg-configsupport for deps which don't have it yet.Without whitespace: https://github.com/curl/curl/pull/14483/files?w=1