cmake: enable CURL_USE_PKGCONFIG for cross-MINGW

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 e1ab01d1bd #14658
Follow-up to c555ab469d #14575

Closes #15005
This commit is contained in:
Viktor Szakats 2024-09-22 19:58:48 +02:00
parent b9895b9d3f
commit 39c06f7883
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
###########################################################################
@PACKAGE_INIT@
if(UNIX OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING)) # Keep in sync with root CMakeLists.txt
if(UNIX OR VCPKG_TOOLCHAIN OR MINGW) # Keep in sync with root CMakeLists.txt
set(_curl_use_pkgconfig_default ON)
else()
set(_curl_use_pkgconfig_default OFF)

View File

@ -264,7 +264,7 @@ else()
endif()
# Override to force-disable or force-enable the use of pkg-config.
if(UNIX OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING)) # Keep in sync with CMake/curl-config.cmake.in
if(UNIX OR VCPKG_TOOLCHAIN OR MINGW) # Keep in sync with CMake/curl-config.cmake.in
set(_curl_use_pkgconfig_default ON)
else()
set(_curl_use_pkgconfig_default OFF)

View File

@ -276,7 +276,7 @@ Details via CMake
- `CURL_USE_LIBUV`: Use libuv for event-based tests. Default: `OFF`
- `CURL_USE_MBEDTLS`: Enable mbedTLS for SSL/TLS. Default: `OFF`
- `CURL_USE_OPENSSL`: Enable OpenSSL for SSL/TLS. Default: `ON` if no other TLS backend was enabled.
- `CURL_USE_PKGCONFIG`: Enable `pkg-config` to detect dependencies. Default: `ON` for Unix, vcpkg, MinGW if not cross-compiling.
- `CURL_USE_PKGCONFIG`: Enable `pkg-config` to detect dependencies. Default: `ON` for Unix, vcpkg, MinGW.
- `CURL_USE_RUSTLS`: Enable Rustls for SSL/TLS. Default: `OFF`
- `CURL_USE_SCHANNEL`: Enable Windows native SSL/TLS (Schannel). Default: `OFF`
- `CURL_USE_SECTRANSP`: Enable Apple OS native SSL/TLS (Secure Transport). Default: `OFF`