-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
41 lines (34 loc) · 931 Bytes
/
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
project('marine_greetd', 'rust',
version: '0.3.2',
meson_version: '>=0.60')
cargo = find_program('cargo', version: '>= 1.66')
rustc = find_program('rustc', version: '>= 1.66')
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
configdir = get_option('sysconfdir')
build_release = not get_option('debug')
if get_option('marine_cli')
targetdir = 'debug'
command = [ cargo , 'build', '--bin', 'marine_cli']
if build_release
command += '--release'
targetdir = 'release'
endif
command += [
'&&',
'cp',
meson.global_source_root() / 'target' / targetdir / 'marine_cli',
'@OUTPUT@'
]
marine_cli_target = custom_target(meson.project_name(),
output: 'marine_cli',
build_by_default: true,
install: true,
install_dir: bindir,
console: true,
command: command
)
install_data('misc/config.toml',
install_dir: configdir / 'marine_greetd'
)
endif