From 90a49647e963f09badd2b58384b1df38788c1de3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Dec 2021 12:38:22 -0500 Subject: 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 --- Modules/FindPkgConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index ef43a3a..547bc52 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -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} -- cgit v0.12