-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
58 lines (46 loc) · 1.56 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
project(
'ArcamClient',
'rust',
version: '0.0.0', # Ensure this is the same as the version number in Cargo.toml
default_options: ['buildtype=release'],
license: 'GPLv3',
)
application_id = 'uk.org.winder.arcamclient'
prefix = get_option('prefix')
bindir = get_option('bindir')
datadir = get_option('datadir')
dependency('glib-2.0', version: '>= 2.56') # 2.60.6 on flatpak
dependency('gio-2.0', version: '>= 2.56') # 2.60.6 on flatpak
dependency('gtk+-3.0', version: '>= 3.22') # 3.24.20 on flatpak
cargo = find_program('cargo')
cargo_script = find_program('scripts/cargo.sh')
sources = run_command('sh', '-c', 'cd ${MESON_SOURCE_ROOT} && ls src/*.rs').stdout().strip().split()
arcamclient_target_name = 'arcamclient'
arcamclient = custom_target(
arcamclient_target_name,
build_by_default: true,
console: true,
input: sources,
output: [arcamclient_target_name],
install: true,
install_dir: bindir,
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@', get_option('buildtype'),]
)
install_man('doc/arcamclient.1')
install_data(
'data/@0@.desktop'.format(application_id),
install_dir: datadir / 'applications'
)
install_data(
'data/@0@.metainfo.xml'.format(application_id),
install_dir: datadir / 'metainfo'
)
install_data(
'src/resources/@0@.svg'.format(application_id),
install_dir: datadir / 'icons' / 'hicolor' / 'scalable' / 'apps'
)
meson.add_dist_script(
'scripts/dist-vendor.sh',
meson.build_root() / 'meson-dist' / meson.project_name() + '-' + meson.project_version(),
meson.source_root()
)