gnome: Make sure g-ir-scanner can use pkg-config properly

We need to setup the environment we pass to g-ir-scanner because it will
try to use pkg-config to find dependencies, and that must respect user
settings from machine file. Also make it use uninstalled pc files Meson
generated in the case dependencies, such as glib, have been built as
subproject.
pull/10331/head
Xavier Claessens 3 years ago committed by Xavier Claessens
parent 18bec0d3e3
commit ca77adea89
  1. 8
      mesonbuild/modules/gnome.py

@ -967,6 +967,13 @@ class GnomeModule(ExtensionModule):
elif install_dir is False:
install = False
# g-ir-scanner uses pkg-config to find libraries such as glib. They could
# be built as subproject in which case we need to trick it to use
# -uninstalled.pc files Meson generated. It also must respect pkgconfig
# settings user could have set in machine file, like PKG_CONFIG_LIBDIR,
# SYSROOT, etc.
run_env = PkgConfigDependency.get_env(state.environment, MachineChoice.HOST, uninstalled=True)
return GirTarget(
girfile,
state.subdir,
@ -980,6 +987,7 @@ class GnomeModule(ExtensionModule):
install=install,
install_dir=[install_dir],
install_tag=['devel'],
env=run_env,
)
@staticmethod

Loading…
Cancel
Save