summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-12-02 17:38:22 (GMT)
committerBrad King <brad.king@kitware.com>2021-12-02 17:38:22 (GMT)
commit90a49647e963f09badd2b58384b1df38788c1de3 (patch)
tree3eec1cdb231dea5e06824ce0ceac72b466124f79
parenteeaf1e10cb5f736692136cb31c4ffbb717599917 (diff)
downloadCMake-90a49647e963f09badd2b58384b1df38788c1de3.zip
CMake-90a49647e963f09badd2b58384b1df38788c1de3.tar.gz
CMake-90a49647e963f09badd2b58384b1df38788c1de3.tar.bz2
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
-rw-r--r--Modules/FindPkgConfig.cmake2
1 files changed, 1 insertions, 1 deletions
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}