-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmeson.build
More file actions
65 lines (52 loc) · 1.21 KB
/
meson.build
File metadata and controls
65 lines (52 loc) · 1.21 KB
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
project(
'Bobby',
'rust',
version: '50.0.0',
meson_version: '>=1.1'
)
command_name = 'bobby'
application_id = 'studio.planetpeanut.Bobby'
gnome = import('gnome')
dependency('glib-2.0')
dependency('gtk4')
dependency('libadwaita-1')
subdir('data')
subdir('data/icons')
summary(
{
'nightly': get_option('nightly'),
'bindir': get_option('bindir')
},
section: 'Options',
)
cargo = find_program('cargo', required: true)
custom_target(
command_name,
command: [
'sh', '-c',
'cd ' + meson.project_source_root() + ' && ' +
'cargo build --release && ' +
'cp target/release/' + command_name + ' ' + meson.project_build_root() + '/' + command_name
],
output: command_name,
build_by_default: true,
console: true,
install: true,
install_dir: get_option('bindir'),
)
test('cargo_test',
cargo,
args: ['test'],
workdir: meson.project_source_root(),
timeout: 300,
)
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)
meson.add_dist_script(
'build-aux/dist-vendor.sh',
meson.project_source_root(),
meson.project_build_root() / 'meson-dist' / '@0@-@1@'.format(meson.project_name(), meson.project_version()),
)