gst-env: Use meson-uninstalled pkgconfig files if available

This allows people to use the development environment for building
projects when glib is built as a subproject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/158>
This commit is contained in:
Nirbheek Chauhan 2020-06-12 18:59:17 +05:30
parent 5234b05f92
commit 8b9073367f

View file

@ -358,6 +358,11 @@ def get_subprocess_env(options, gst_version):
for pkg_dir in pkg_dirs: for pkg_dir in pkg_dirs:
prepend_env_var(env, "PKG_CONFIG_PATH", pkg_dir, options.sysroot) prepend_env_var(env, "PKG_CONFIG_PATH", pkg_dir, options.sysroot)
# Check if meson has generated -uninstalled pkgconfig files
meson_uninstalled = pathlib.Path(options.builddir) / 'meson-uninstalled'
if meson_uninstalled.is_dir():
prepend_env_var(env, 'PKG_CONFIG_PATH', str(meson_uninstalled), options.sysroot)
for python_dir in python_dirs: for python_dir in python_dirs:
prepend_env_var(env, 'PYTHONPATH', python_dir, options.sysroot) prepend_env_var(env, 'PYTHONPATH', python_dir, options.sysroot)