Skip to content

Commit

Permalink
build-sys: set glib dependency version
Browse files Browse the repository at this point in the history
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 <marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
  • Loading branch information
elmarco committed Dec 17, 2021
1 parent 8b5786b commit 41de20d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions configure
Expand Up @@ -3713,6 +3713,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
Expand Down
6 changes: 4 additions & 2 deletions meson.build
Expand Up @@ -396,14 +396,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')
Expand Down

0 comments on commit 41de20d

Please sign in to comment.