FindPkgConfig: Deprecate PKG_CONFIG_FOUND

Since most of the find modules use the `<PackageName>_FOUND` result
variables, this now also syncs it for the FindPkgConfig module. The
`PkgConfig_FOUND` result variable is available since CMake 3.3 and
contains the same value. There is also `PKGCONFIG_FOUND` result variable
automatically set with the same value but for simplicity isn't
documented. The uppercased `<PACKAGENAME>_FOUND` result variables set by
find modules are also considered legacy variables.
This commit is contained in:
Peter Kokot
2025-08-21 01:01:33 +02:00
parent 9e89400d13
commit 9e3d2cd94f
25 changed files with 44 additions and 29 deletions

View File

@@ -57,7 +57,7 @@ Finding the libinput library and linking it to a project target:
# Use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
if(PkgConfig_FOUND)
pkg_check_modules(PKG_Libinput QUIET libinput)
endif()