From d83acfd013ada96f3c5fe216f8b3648f0d311a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sat, 9 Oct 2021 17:37:40 +0400 Subject: [PATCH] build-sys: set glib dependency version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Further meson configuration tests are to be added based on the glib version. Also correct the version reporting in the config log. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- configure | 1 + meson.build | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 8ccfe51673..51eae49daf 100755 --- a/configure +++ b/configure @@ -3694,6 +3694,7 @@ echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak echo "GLIB_LIBS=$glib_libs" >> $config_host_mak +echo "GLIB_VERSION=$(pkg-config --modversion glib-2.0)" >> $config_host_mak echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak diff --git a/meson.build b/meson.build index 1c70839bbf..c37eb92ebe 100644 --- a/meson.build +++ b/meson.build @@ -404,14 +404,16 @@ endif add_project_arguments(config_host['GLIB_CFLAGS'].split(), native: false, language: ['c', 'cpp', 'objc']) glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), - link_args: config_host['GLIB_LIBS'].split()) + link_args: config_host['GLIB_LIBS'].split(), + version: config_host['GLIB_VERSION']) # override glib dep with the configure results (for subprojects) meson.override_dependency('glib-2.0', glib) gio = not_found if 'CONFIG_GIO' in config_host gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), - link_args: config_host['GIO_LIBS'].split()) + link_args: config_host['GIO_LIBS'].split(), + version: config_host['GLIB_VERSION']) endif lttng = not_found if 'ust' in get_option('trace_backends')