diff --git a/meson.build b/meson.build index a99ed19..70d92fd 100644 --- a/meson.build +++ b/meson.build @@ -52,6 +52,8 @@ endif cargo = find_program('cargo') cargo_env = environment() cargo_env.set('MESON_BUILD_ROOT', meson.project_build_root()) +cargo_env.set('CARGO_MANIFEST_DIR', meson.project_source_root()) +cargo_env.set('CARGO_TARGET_DIR', meson.project_build_root() / 'target') meson.add_devenv(cargo_env) custom_target( @@ -67,13 +69,6 @@ custom_target( cargo, 'build', rust_args, - '--manifest-path', - meson.project_source_root() / 'Cargo.toml', - '--target-dir', - meson.project_build_root() / 'cargo-target', ], env: cargo_env, ) - -run_target('clippy', command: [cargo, 'clippy'], env: cargo_env) -run_target('cargo-doc', command: [cargo, 'doc'], env: cargo_env)