mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 06:40:16 -05:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user