-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
40 lines (33 loc) · 761 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
project(
'utena',
'rust',
version: '0.4.6',
license: 'MIT',
meson_version: '>= 0.59'
)
cargo = find_program('cargo', required: true)
rustc = find_program('rustc', required: true)
if get_option('debug')
command = [
cargo, 'build',
'&&',
'cp', meson.global_source_root() / 'target' / 'debug' / meson.project_name(), '@OUTPUT@'
]
else
command = [
cargo, 'build',
'--release',
'&&',
'cp', meson.global_source_root() / 'target' / 'release' / meson.project_name(), '@OUTPUT@'
]
endif
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
utena_target = custom_target('utena',
output: 'utena',
build_by_default: true,
install: true,
install_dir: bindir,
console: true,
command: command
)