소스 검색

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
Brad King 3 년 전
부모
커밋
90a49647e9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Modules/FindPkgConfig.cmake

+ 1 - 1
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}