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
@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)
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)