-
Notifications
You must be signed in to change notification settings - Fork 102
/
meson.build
69 lines (61 loc) · 2.07 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
icon_sizes = ['16', '24', '32', '48', '64', '128']
foreach i : icon_sizes
install_data(
join_paths('icons', i, meson.project_name() + '.svg'),
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps')
)
install_data(
join_paths('icons', i, meson.project_name() + '.svg'),
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i + '@2', 'apps')
)
endforeach
install_data(
join_paths('scripts', meson.project_name() + '.search.sh'),
install_dir: join_paths(scripts_dir, 'tasks'),
install_mode: 'rwxr-xr-x'
)
install_data(
join_paths('scripts', meson.project_name() + '.dictionary.sh'),
install_dir: join_paths(scripts_dir, 'tasks'),
install_mode: 'rwxr-xr-x'
)
install_subdir(
'scripts/mobi_lib',
install_dir: scripts_dir,
install_mode: 'rwxr-xr-x'
)
i18n.merge_file(
input: meson.project_name() + '.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.source_root(), 'po'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
install_data (
meson.project_name () + '.gschema.xml',
install_dir: join_paths (get_option ('datadir'), 'glib-2.0', 'schemas')
)
i18n.merge_file(
input: meson.project_name() + '.appdata.xml.in',
output: meson.project_name() + '.appdata.xml',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
desktop_file_validate = find_program('desktop-file-validate', required:false)
if desktop_file_validate.found()
test (
'Validate desktop file',
desktop_file_validate,
args: join_paths(meson.current_build_dir (), meson.project_name() + '.desktop')
)
endif
appstreamcli = find_program(['appstreamcli', 'appstream-util'], required:false)
if appstreamcli.found()
test (
'Validate appdata file',
appstreamcli,
args: ['validate', join_paths(meson.current_build_dir (), meson.project_name() + '.appdata.xml')]
)
endif