Verified Commit 34e0e89b authored by Jordan Petridis's avatar Jordan Petridis 🌱
Browse files

build: place CARGO_HOME and CARGO_TARGET_DIR relative to meson builddir

parent 08e35ece
Pipeline #277270 passed with stages
in 35 minutes and 47 seconds
......@@ -25,7 +25,6 @@
],
"cflags": "-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED",
"env": {
"CARGO_HOME": "/run/build/gnome-podcasts/cargo",
"RUSTFLAGS": "",
"RUST_BACKTRACE": "1",
"RUST_LOG": "podcasts_gtk=debug,podcasts_data=debug,glib=debug",
......
......@@ -56,8 +56,8 @@ cargo_release = custom_target('cargo-build',
console: true,
depends: podcasts_resources,
command: [cargo_script,
'@SOURCE_ROOT@',
'@OUTPUT@',
meson.build_root(),
profile
])
meson.source_root(),
'@OUTPUT@',
profile,
])
......@@ -2,10 +2,12 @@
set -ex
export OUTPUT="$2"
export CARGO_TARGET_DIR="$3"/target
export CARGO_HOME="$CARGO_TARGET_DIR"/cargo-home
export MESON_BUILD_ROOT="$1"
export MESON_SOURCE_ROOT="$2"
export OUTPUT="$3"
export PROFILE="$4"
export CARGO_TARGET_DIR="$MESON_BUILD_ROOT"/target
export CARGO_HOME="$MESON_BUILD_ROOT"/cargo-home
TARGET=debug
ARGS=()
......@@ -21,5 +23,5 @@ if test -d vendor; then
ARGS+=('--frozen')
fi
cargo build ${ARGS[@]} --manifest-path="$1"/Cargo.toml -p podcasts-gtk
cargo build ${ARGS[@]} --manifest-path="$MESON_SOURCE_ROOT"/Cargo.toml -p podcasts-gtk
cp "$CARGO_TARGET_DIR"/${TARGET}/podcasts-gtk "$OUTPUT"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment