Our workaround for getting meson and cargo working together included a separate 'release' target that replaced 'ninja dist' so that we could vendor dependencies. Now we use meson's add_dist_script to vendor the dependencies as part of 'ninja dist', so we no longer need the 'release' target.
27 lines
456 B
Bash
Executable File
27 lines
456 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
export CARGO_HOME=$1/target/cargo-home
|
|
export LOCALEDIR="$3"
|
|
export APP_ID="$4"
|
|
export VERSION="$5"
|
|
export PROFILE="$6"
|
|
|
|
TARGET=debug
|
|
ARGS=()
|
|
|
|
if test "$PROFILE" != "Devel"; then
|
|
echo "RELEASE MODE"
|
|
ARGS+=('--release')
|
|
TARGET=release
|
|
fi
|
|
|
|
if test -d vendor; then
|
|
echo "VENDORED"
|
|
ARGS+=('--frozen')
|
|
fi
|
|
|
|
cargo build ${ARGS[@]} --manifest-path="$1"/Cargo.toml -p podcasts-gtk &&
|
|
cp $1/target/${TARGET}/podcasts-gtk $2
|