FindPkgConfig: Restore finding pkg-config before pkgconf

Since commit 94a84dc0af (FindPkgConfig: add pkgconf to the search list.,
2021-07-02, v3.22.0-rc1~468^2), `pkgconf` is preferred over `pkg-config`
if they appear in the same directory.  In some environments,
`pkg-config` may be a wrapper that adds semantics beyond either
`pkgconf` or the normal `pkg-config`.  Prefer `pkg-config` over
`pkgconf` in order to preserve the prior behavior in such environments.

Fixes: #22976
This commit is contained in:
Brad King
2021-12-02 12:38:22 -05:00
parent eeaf1e10cb
commit 90a49647e9
+1 -1
View File
@@ -57,7 +57,7 @@ set(PKG_CONFIG_NAMES "pkg-config")
if(CMAKE_HOST_WIN32)
list(PREPEND PKG_CONFIG_NAMES "pkg-config.bat")
endif()
list(PREPEND PKG_CONFIG_NAMES "pkgconf")
list(APPEND PKG_CONFIG_NAMES "pkgconf")
find_program(PKG_CONFIG_EXECUTABLE
NAMES ${PKG_CONFIG_NAMES}