919037495f
Instead of putting target/ and in the source directory, we can tell our cargo script to put both target and our cargo-home in meson's build directory. This means that when triggering a rebuild through meson via tooling like Builder, Fractal will actually rebuild.
15 lines
481 B
Bash
Executable file
15 lines
481 B
Bash
Executable file
#!/bin/sh
|
|
|
|
export OUTPUT="$2"
|
|
export CARGO_TARGET_DIR="$3"/target
|
|
export CARGO_HOME="$CARGO_TARGET_DIR"/cargo-home
|
|
export FRACTAL_PROFILE="$4"
|
|
|
|
if [ "$FRACTAL_PROFILE" = "Devel" ]
|
|
then
|
|
echo "DEBUG MODE"
|
|
cargo build --manifest-path $1/Cargo.toml -p fractal-gtk && cp "$CARGO_TARGET_DIR"/debug/fractal-gtk "$OUTPUT"
|
|
else
|
|
echo "RELEASE MODE"
|
|
cargo build --manifest-path $1/Cargo.toml --release -p fractal-gtk && cp "$CARGO_TARGET_DIR"/release/fractal-gtk "$OUTPUT"
|
|
fi
|