Skip to content

FindPkgConfig: Fix preservation of ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS}

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

Fix the ENV save/restore added by !6345 (merged) to unset the variable if it was originally not set.

While at it, clarify the value to which we temporarily set it. The pkg-config and pkgconf tools only check that the variable is set, and do not care about the value. Set it to a more true-looking value.

Issue: #22148 (closed)
Backport: release

Merge request reports