diff options
author | Paolo Bonzini | 2020-09-01 14:41:17 +0200 |
---|---|---|
committer | Paolo Bonzini | 2020-09-08 11:43:16 +0200 |
commit | 215b0c2fa5c9864343373f5a3e6680611dabef20 (patch) | |
tree | bcb2a515da4ec3cac572d7adcda7b8cddfb1d137 /meson.build | |
parent | configure: do not look for install(1) (diff) | |
download | qemu-215b0c2fa5c9864343373f5a3e6680611dabef20.tar.gz qemu-215b0c2fa5c9864343373f5a3e6680611dabef20.tar.xz qemu-215b0c2fa5c9864343373f5a3e6680611dabef20.zip |
meson: get glib compilation flags from GLIB_CFLAGS
The glib compilation flags were added to QEMU_CFLAGS. While we still
want them to be added to all compilation commands (at least for now),
do that via GLIB_CFLAGS rather than via QEMU_CFLAGS. This shows that
glib is a special case and makes it clearer that QEMU_CFLAGS is only
about compiler commands and not dependencies.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 22fc4bc875..689fc2269c 100644 --- a/meson.build +++ b/meson.build @@ -104,8 +104,11 @@ elif targetos == 'haiku' cc.find_library('network'), cc.find_library('bsd')] endif -glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), - link_args: config_host['GLIB_LIBS'].split()) +# The path to glib.h is added to all compilation commands. This was +# grandfathered in from the QEMU Makefiles. +add_project_arguments(config_host['GLIB_CFLAGS'].split(), + native: false, language: ['c', 'cpp', 'objc']) +glib = declare_dependency(link_args: config_host['GLIB_LIBS'].split()) gio = not_found if 'CONFIG_GIO' in config_host gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), |