mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 11:36:11 +08:00
This fixes a typo from 96c61e43 that caused the binary to be generated with the wrong name.
32 lines
775 B
Meson
32 lines
775 B
Meson
cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
|
|
cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ]
|
|
|
|
if get_option('profile') == 'default'
|
|
cargo_options += [ '--release' ]
|
|
rust_target = 'release'
|
|
message('Building in release mode')
|
|
else
|
|
rust_target = 'debug'
|
|
message('Building in debug mode')
|
|
endif
|
|
|
|
cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
|
|
|
|
custom_target(
|
|
'cargo-build',
|
|
build_by_default: true,
|
|
build_always_stale: true,
|
|
output: meson.project_name(),
|
|
console: true,
|
|
install: true,
|
|
install_dir: bindir,
|
|
command: [
|
|
'env',
|
|
cargo_env,
|
|
cargo, 'build',
|
|
cargo_options,
|
|
'&&',
|
|
'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
|
|
],
|
|
)
|