FindPkgConfig: Write variables to cache for newer versions of pkg-config
This affects the FindPkgConfig
module.
There is a bug when newer versions of pkg-config
are installed which causes the variables ${_prefix}_INCLUDE_DIRS
and ${_prefix}_CFLAGS_OTHER
to only get set in the current scope and not written to the cache. Subsequent runs of CMake would cause the
variables to not be set and the build to fail.
For instance running Ubuntu 22.04 (version 0.29.2
of pkg-config
) works as expected but running Ubuntu 23.04 (version 1.8.1
) breaks.
Issue: #25377 (closed)
Topic-rename: FindPkgConfig-caching
Edited by Brad King