Skip to content

FindPkgConfig: unset results when pkg-config is broken

FUJI Goro requested to merge gfx/cmake:fix_issue_with_broken_pkg_config into master

FindPkgConfig sets PKG_CONFIG_EXECUTABLE and PKG_CONFIG_FOUND even if pkg-config is broken 1. This MR unsets these variables if pkg-config exits with non-zero. I believe this is the expected behavior.

Topic-rename: FindPkgConfig-broken-pkg-config

  1. It could be broken on macOS. In my environment, pkg-config aborts with the message dyld: Symbol not found: __cg_jpeg_resync_to_restart. I'd love to fix it, but it is irrelevant to this merge request.

Edited by Brad King

Merge request reports