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
|
From: Manuel Traut <manut@mecka.net>
Date: Sat, 16 Nov 2024 16:34:46 +0100
Subject: meson: Don't relay on Cargo.lock, fix install path
---
meson.build | 1 -
meson_options.txt | 4 ++++
podcasts-gtk/src/meson.build | 8 ++------
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/meson.build b/meson.build
index 31798ee..d4190b1 100644
--- a/meson.build
+++ b/meson.build
@@ -42,7 +42,6 @@ endif
podcast_toml = files(
'Cargo.toml',
- 'Cargo.lock',
'podcasts-data/Cargo.toml',
'podcasts-gtk/Cargo.toml',
)
diff --git a/meson_options.txt b/meson_options.txt
index 4c5cc39..8dda4f6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,7 @@ option (
],
value: 'default'
)
+option (
+ 'host_arch',
+ type: 'string',
+)
diff --git a/podcasts-gtk/src/meson.build b/podcasts-gtk/src/meson.build
index 8bf8a00..1a3bcd2 100644
--- a/podcasts-gtk/src/meson.build
+++ b/podcasts-gtk/src/meson.build
@@ -29,8 +29,6 @@ else
message('Building in debug mode')
endif
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
-
cargo_release = custom_target('cargo-build',
build_by_default: true,
build_always_stale: true,
@@ -39,10 +37,8 @@ cargo_release = custom_target('cargo-build',
install_dir: podcasts_bindir,
console: true,
depends: podcasts_resources,
- command: ['env',
- cargo_env,
- cargo, 'build',
+ command: [cargo, 'build',
cargo_options,
'&&',
- 'cp', 'podcasts-gtk' / 'src' / rust_target / 'podcasts-gtk', '@OUTPUT@',
+ 'cp', 'podcasts-gtk' / 'src' / get_option('host_arch') / rust_target / 'podcasts-gtk', '@OUTPUT@',
])
|