aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-04-21 14:05:31 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2018-04-21 17:05:31 +0300
commit74404db469bc37fbe184cc708a19ccbe58bf83df (patch)
treefdb8b20fe8d14204d7d77edd43bfc4e338051b60 /mesonbuild/modules/gnome.py
parenta015804049bd7131e42cdfd6f97cca8024b65634 (diff)
downloadmeson-74404db469bc37fbe184cc708a19ccbe58bf83df.zip
meson-74404db469bc37fbe184cc708a19ccbe58bf83df.tar.gz
meson-74404db469bc37fbe184cc708a19ccbe58bf83df.tar.bz2
gnome: If pkg-config is not found, assume glib is 2.54 (#3443)
* gnome: If pkg-config is not found, assume glib is 2.0 Checking the pkg-config file to confirm tool versions is a hack, and should eventually be replaced with checking the actual versions of the tools. * gnome: Actually assume glib version is 2.54 if not found It is actually not possible to build most projects with the GNOME module if your glib is older, particularly genmarshal and gdbus-codegen generate unusable output without newer arguments that were added for Meson.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index c0a3bbf..abefe05 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -67,8 +67,13 @@ class GnomeModule(ExtensionModule):
global native_glib_version
if native_glib_version is None:
glib_dep = PkgConfigDependency('glib-2.0', state.environment,
- {'native': True})
- native_glib_version = glib_dep.get_version()
+ {'native': True, 'required': False})
+ if glib_dep.found():
+ native_glib_version = glib_dep.get_version()
+ else:
+ mlog.warning('Could not detect glib version, assuming 2.54. '
+ 'You may get build errors if your glib is older.')
+ native_glib_version = '2.54'
return native_glib_version
def __print_gresources_warning(self, state):