diff --git a/build-aux/cargo.py b/build-aux/cargo.py index 547bcc9..77ca8a3 100755 --- a/build-aux/cargo.py +++ b/build-aux/cargo.py @@ -15,6 +15,7 @@ args = parser.parse_args() environ["CARGO_TARGET_DIR"] = path.join(args.build_root, "target") environ["CARGO_HOME"] = path.join(args.build_root, "cargo-home") +environ["OUT_DIR"] = path.join(args.build_root, "target") cargo_toml_path = path.join(args.source_root, "Cargo.toml") diff --git a/src/meson.build b/src/meson.build index f5dcc63..31fa543 100644 --- a/src/meson.build +++ b/src/meson.build @@ -31,7 +31,7 @@ else message('Building in debug mode') endif -cargo_env = [ 'CARGO_HOME=' + cargo_home ] +cargo_env = [ 'CARGO_HOME=' + cargo_home, 'OUT_DIR=' + meson.project_build_root() ] cargo_build = custom_target( 'cargo-build',