summary refs log tree commit diff stats
path: root/rust/meson.build
blob: 695d5a62de901318de0d929365a2b532e461c3cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
subproject('anyhow-1-rs', required: true)
subproject('bilge-0.2-rs', required: true)
subproject('bilge-impl-0.2-rs', required: true)
subproject('foreign-0.3-rs', required: true)
subproject('libc-0.2-rs', required: true)

anyhow_rs = dependency('anyhow-1-rs')
bilge_rs = dependency('bilge-0.2-rs')
bilge_impl_rs = dependency('bilge-impl-0.2-rs')
foreign_rs = dependency('foreign-0.3-rs')
libc_rs = dependency('libc-0.2-rs')

subproject('proc-macro2-1-rs', required: true)
subproject('quote-1-rs', required: true)
subproject('syn-2-rs', required: true)
subproject('attrs-0.2-rs', required: true)

quote_rs_native = dependency('quote-1-rs', native: true)
syn_rs_native = dependency('syn-2-rs', native: true)
proc_macro2_rs_native = dependency('proc-macro2-1-rs', native: true)
attrs_rs_native = dependency('attrs-0.2-rs', native: true)

genrs = []

subdir('qemu-macros')

subdir('common')
subdir('bits')
subdir('util')
subdir('migration')
subdir('bql')
subdir('qom')
subdir('system')
subdir('chardev')
subdir('hw/core')
subdir('tests')
subdir('trace')
subdir('hw')

cargo = find_program('cargo', required: false)

if cargo.found()
  run_target('rustfmt',
    command: [config_host['MESON'], 'devenv',
              '--workdir', '@CURRENT_SOURCE_DIR@',
              cargo, 'fmt'],
    depends: genrs)
endif