]> git.proxmox.com Git - mirror_qemu.git/blame - meson.build
configure: integrate Meson in the build system
[mirror_qemu.git] / meson.build
CommitLineData
a5665051
PB
1project('qemu', ['c'], meson_version: '>=0.55.0',
2 default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_lundef=false'],
3 version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
4
5not_found = dependency('', required: false)
6keyval = import('unstable-keyval')
7config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
8
9add_project_arguments(config_host['QEMU_CFLAGS'].split(),
10 native: false, language: ['c', 'objc'])
11add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
12 native: false, language: 'cpp')
13add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
14 native: false, language: ['c', 'cpp', 'objc'])
15add_project_arguments(config_host['QEMU_INCLUDES'].split(),
16 language: ['c', 'cpp', 'objc'])
17
18add_languages('cpp', required: false, native: false)
19if host_machine.system() == 'darwin'
20 add_languages('objc', required: false, native: false)
21endif
22
23configure_file(input: files('scripts/ninjatool.py'),
24 output: 'ninjatool',
25 configuration: config_host)