]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
meson: Add GLib version macros
authorSimon McVittie <smcv@collabora.com>
Tue, 28 Jun 2022 11:50:32 +0000 (12:50 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 13 Jul 2022 19:36:13 +0000 (20:36 +0100)
This helps to avoid unintended dependencies on newer versions of GLib.

Signed-off-by: Simon McVittie <smcv@collabora.com>
meson.build

index f9d25bba753908040553ea98a8ae821dea8c90dd..7fde9c9cddae658a49dcdb91f0fbb5d324c7b06a 100644 (file)
@@ -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'