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
|
diff --git a/src/meson.build b/src/meson.build
index 96f692d..62a79e3 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -21,37 +21,4 @@ run_command(
join_paths(meson.project_build_root(), 'src', 'config.rs'),
join_paths(meson.project_source_root(), 'src', 'config.rs'),
check: true
-)
-
-# Setup cargo
-cargo = find_program('cargo')
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
-cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
-cargo_options += [ '--target-dir', meson.project_build_root() / 'target' ]
-
-if get_option('profile') == 'default'
- cargo_options += [ '--release' ]
- rust_target = 'release'
- message('Building in release mode')
-else
- rust_target = 'debug'
- message('Building in debug mode')
-endif
-
-cargo_release = custom_target(
- 'cargo-build',
- build_by_default: true,
- build_always_stale: true,
- output: meson.project_name(),
- console: true,
- install: true,
- install_dir: bindir,
- command: [
- 'env',
- cargo_env,
- cargo, 'build',
- cargo_options,
- '&&',
- 'cp', 'target' / rust_target / meson.project_name(), '@OUTPUT@',
- ]
)
\ No newline at end of file
|