summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini2020-10-14 14:45:42 +0200
committerPaolo Bonzini2020-10-17 16:45:50 +0200
commit1e6e616dc21a8117cbe36a7e9026221b566cdf56 (patch)
tree58eb5e3f499dfafd70aa82cfd9dc2899dcc4daeb /meson.build
parenttests: add missing generated sources to testqapi (diff)
downloadqemu-1e6e616dc21a8117cbe36a7e9026221b566cdf56.tar.gz
qemu-1e6e616dc21a8117cbe36a7e9026221b566cdf56.tar.xz
qemu-1e6e616dc21a8117cbe36a7e9026221b566cdf56.zip
configure: move QEMU_INCLUDES to meson
Confusingly, QEMU_INCLUDES is not used by configure tests. Moving it to meson.build ensures that Windows paths are specified instead of the msys paths like /c/Users/... Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build30
1 files changed, 28 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 1a4a482492..88f757eac9 100644
--- a/meson.build
+++ b/meson.build
@@ -93,9 +93,35 @@ add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
native: false, language: 'cpp')
add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
native: false, language: ['c', 'cpp', 'objc'])
-add_project_arguments(config_host['QEMU_INCLUDES'].split(),
- language: ['c', 'cpp', 'objc'])
+if targetos == 'linux'
+ add_project_arguments('-isystem', meson.current_source_dir() / 'linux-headers',
+ '-isystem', 'linux-headers',
+ language: ['c', 'cpp'])
+endif
+
+if 'CONFIG_TCG_INTERPRETER' in config_host
+ tcg_arch = 'tci'
+elif config_host['ARCH'] == 'sparc64'
+ tcg_arch = 'sparc'
+elif config_host['ARCH'] == 's390x'
+ tcg_arch = 's390'
+elif config_host['ARCH'] in ['x86_64', 'x32']
+ tcg_arch = 'i386'
+elif config_host['ARCH'] == 'ppc64'
+ tcg_arch = 'ppc'
+elif config_host['ARCH'] in ['riscv32', 'riscv64']
+ tcg_arch = 'riscv'
+else
+ tcg_arch = config_host['ARCH']
+endif
+add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch,
+ '-iquote', '.',
+ '-iquote', meson.current_source_dir(),
+ '-iquote', meson.current_source_dir() / 'accel/tcg',
+ '-iquote', meson.current_source_dir() / 'include',
+ '-iquote', meson.current_source_dir() / 'disas/libvixl',
+ language: ['c', 'cpp', 'objc'])
link_language = meson.get_external_property('link_language', 'cpp')
if link_language == 'cpp'