Doesn't build on Windows (not #34)
The issue is here:
cargo_build = custom_target(
'cargo-build',
build_by_default: true,
build_always_stale: true,
output: meson.project_name(),
console: true,
install: true,
install_dir: bindir,
depends: resources,
command: [
'env',
cargo_env,
cargo, 'build',
cargo_options,
'&&',
'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
]
)
On Windows, custom_target doesn't run in a shell, so it erros out on "&&". This can be hot fixed by editing the generated build.ninja after the fact so that it starts with cmd /c and then put everything else into a single string, with spaces between the arguments, and replace "&&" with a single "&". Doing that would in the meson.build be quite inelegant though.
Apparently meson isn't designed to make it easy to have multiple separate commands in a single custom_target.
Edited by Raidro Manchester