mirror of
https://github.com/curl/curl.git
synced 2026-08-26 04:23:33 +03:00
cmake: limit pkg-config to UNIX and MSVC+vcpkg by default
Limits `pkg-config` to UNIX and MSVC with vcpkg, by default. Compared to curl 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-cross MINGW, or all MINGW). In the meantime everyone is free to override the default and test their build with `pkg-config` by setting the `CURL_USE_PKGCONFIG=ON` CMake option. Closes #14575
This commit is contained in:
parent
211cbcb4f6
commit
c555ab469d
2 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@
|
|||
@PACKAGE_INIT@
|
||||
|
||||
if(NOT DEFINED CURL_USE_PKGCONFIG)
|
||||
if(NOT MSVC OR VCPKG_TOOLCHAIN)
|
||||
if(UNIX OR (MSVC AND VCPKG_TOOLCHAIN)) # Keep this in sync with root CMakeLists.txt
|
||||
set(CURL_USE_PKGCONFIG ON)
|
||||
else()
|
||||
set(CURL_USE_PKGCONFIG OFF)
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ else()
|
|||
endif()
|
||||
|
||||
# Override to force-disable or force-enable the use of pkg-config.
|
||||
if(NOT MSVC OR VCPKG_TOOLCHAIN)
|
||||
if(UNIX OR (MSVC AND VCPKG_TOOLCHAIN)) # Keep this in sync with CMake/curl-config.cmake.in
|
||||
set(_curl_use_pkgconfig_default ON)
|
||||
else()
|
||||
set(_curl_use_pkgconfig_default OFF)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue