diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-06-10 12:05:14 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-21 06:30:05 -0400 |
commit | a56650518f5ba84ed15b9415fa1041311eeeece0 (patch) | |
tree | e0bb21d39cfeee9e6f4e03a48ef784a5fc27e400 /meson.build | |
parent | dedad0272052f3d848d6d178b681526b2f313029 (diff) | |
download | qemu-a56650518f5ba84ed15b9415fa1041311eeeece0.zip qemu-a56650518f5ba84ed15b9415fa1041311eeeece0.tar.gz qemu-a56650518f5ba84ed15b9415fa1041311eeeece0.tar.bz2 |
configure: integrate Meson in the build system
The Meson build system is integrated in the existing configure/make steps
by invoking Meson from the configure script and converting Meson's build.ninja
rules to an included Makefile.
build.ninja already provides tags/ctags/cscope rules, so they are removed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..613983e --- /dev/null +++ b/meson.build @@ -0,0 +1,25 @@ +project('qemu', ['c'], meson_version: '>=0.55.0', + default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_lundef=false'], + version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) + +not_found = dependency('', required: false) +keyval = import('unstable-keyval') +config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') + +add_project_arguments(config_host['QEMU_CFLAGS'].split(), + native: false, language: ['c', 'objc']) +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']) + +add_languages('cpp', required: false, native: false) +if host_machine.system() == 'darwin' + add_languages('objc', required: false, native: false) +endif + +configure_file(input: files('scripts/ninjatool.py'), + output: 'ninjatool', + configuration: config_host) |