From 154cc9d5ca0bfd09a34cc834b68105b25c0bad30 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 28 Jun 2022 12:50:32 +0100 Subject: meson: Add GLib version macros This helps to avoid unintended dependencies on newer versions of GLib. Signed-off-by: Simon McVittie --- meson.build | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index f9d25bba..7fde9c9c 100644 --- a/meson.build +++ b/meson.build @@ -691,6 +691,9 @@ config.set('DBUS_ENABLE_CHECKS', checks ? 1 : false) config.set('DBUS_DISABLE_CHECKS', not checks ? 1 : false) config.set('G_DISABLE_CHECKS', not checks ? 1 : false) config.set('HAVE_GIO_UNIX', have_gio_unix ? 1 : false) +# Ignore post-2.38 deprecations, prevent use of post-2.44 APIs. +config.set('GLIB_VERSION_MIN_REQUIRED', 'GLIB_VERSION_2_38') +config.set('GLIB_VERSION_MAX_ALLOWED', 'G_ENCODE_VERSION(2,44)') dbus_static_flags = ( get_option('default_library') == 'static' ? '-DDBUS_STATIC_BUILD' -- cgit v1.2.1