FindPkgConfig: CMake 3.22.0 finds pkgconf instead of pkg-config
We have a setup (basically, buildroot) where pkg-config is a wrapper around pkgconf, calling it with correct environment variables set.
Since cmake 3.22, FindPkgConfig also searches for a pkgconf executable (see 94a84dc0) . This breaks this setup, as now cmake finds the pkgconf executable instead of the pkg-config one.
The patch should be fixed to:
- list(PREPEND PKG_CONFIG_NAMES "pkgconf")
- list(APPEND PKG_CONFIG_NAMES "pkgconf")
Which prefer pkg-config over pkgconf if both are present, to avoid breaking existing setups.
Edited by Brad King