meson: Fix pkgconfig detection when specified in machine file

When pkgconfig and pkg_config_path are specified in the machine file,
we need to parse those and pass them on to the cargo_wrapper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1018>
This commit is contained in:
Nirbheek Chauhan 2022-12-17 04:44:50 +05:30 committed by GStreamer Marge Bot
parent 985e3e85d6
commit a507f24694

View file

@ -211,6 +211,17 @@ else
disable_doc = []
endif
# 'pkgconfig' is the entry in the machine file, if specified
pkg_config = find_program('pkgconfig', required: false)
if pkg_config.found()
extra_env += {'PKG_CONFIG': pkg_config.full_path()}
endif
pkg_config_path = get_option('pkg_config_path')
if pkg_config_path.length() > 0
extra_env += {'PKG_CONFIG_PATH': ':'.join(pkg_config_path)}
endif
rs_plugins = custom_target('gst-plugins-rs',
build_by_default: true,
output: output,