-
Notifications
You must be signed in to change notification settings - Fork 447
/
meson.build
73 lines (61 loc) · 1.69 KB
/
meson.build
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
project('virt-manager',
version: '5.0.0',
meson_version: '>=0.63.0',
)
python = import('python')
python3 = python.find_installation('python3')
prefix = get_option('prefix')
datadir = prefix / get_option('datadir')
bindir = prefix / get_option('bindir')
pkgdir = datadir / 'virt-manager'
# figure out if we are building from git
git = run_command('test', '-e', '.git', check: false).returncode() == 0
subdir('scripts')
subdir('man')
subdir('data')
subdir('ui')
subdir('virtinst')
subdir('virtManager')
subdir('po')
bin_data = [
{'pkgname': 'virtinst', 'filename': 'virtinstall', 'toolname': 'virt-install'},
{'pkgname': 'virtinst', 'filename': 'virtclone', 'toolname': 'virt-clone'},
{'pkgname': 'virtinst', 'filename': 'virtxml', 'toolname': 'virt-xml'},
{'pkgname': 'virtManager', 'filename': 'virtmanager', 'toolname': 'virt-manager'},
]
foreach bin : bin_data
custom_target(
command: [make_bin_wrapper_prog, pkgdir, bin['pkgname'], bin['filename']],
capture: true,
output: bin['toolname'],
install: true,
install_dir: bindir,
install_mode: 'rwxr-xr-x',
)
endforeach
gnome = import('gnome')
gnome.post_install(
glib_compile_schemas: get_option('compile-schemas'),
gtk_update_icon_cache: get_option('update-icon-cache'),
)
if git
spec_conf = configuration_data({
'VERSION': meson.project_version(),
})
spec_file = configure_file(
input: 'virt-manager.spec.in',
output: '@BASENAME@',
configuration: spec_conf,
)
meson.add_dist_script(meson_dist_prog.full_path(), spec_file)
endif
if get_option('tests').auto()
use_tests = git
elif get_option('tests').enabled()
use_tests = true
else
use_tests = false
endif
if use_tests
subdir('tests')
endif