]> git.proxmox.com Git - mirror_qemu.git/blob - meson.build
configure: generate Meson cross file
[mirror_qemu.git] / meson.build
1 project('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
5 not_found = dependency('', required: false)
6 keyval = import('unstable-keyval')
7 config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
8
9 add_project_arguments(config_host['QEMU_CFLAGS'].split(),
10 native: false, language: ['c', 'objc'])
11 add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
12 native: false, language: 'cpp')
13 add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
14 native: false, language: ['c', 'cpp', 'objc'])
15 add_project_arguments(config_host['QEMU_INCLUDES'].split(),
16 language: ['c', 'cpp', 'objc'])
17
18 python = import('python').find_installation()
19
20 link_language = meson.get_external_property('link_language', 'cpp')
21 if link_language == 'cpp'
22 add_languages('cpp', required: true, native: false)
23 endif
24 if host_machine.system() == 'darwin'
25 add_languages('objc', required: false, native: false)
26 endif
27
28 configure_file(input: files('scripts/ninjatool.py'),
29 output: 'ninjatool',
30 configuration: config_host)