Skip to content

FindPkgConfig: Restore preference for first pkg-config in PATH

Brad King requested to merge brad.king/cmake:FindPkgConfig-NAMES_PER_DIR into master

Since !5273 (merged) we prefer pkg-config.bat over pkg-config regardless of the order they appear in the PATH. Tell find_program to consider all names in each directory so that the first one in PATH of any name wins.

Issue: #21239 (closed)
Backport: release

Edited by Brad King

Merge request reports