more meson stuff
This commit is contained in:
parent
38f1ce63d3
commit
9e5d23061c
2 changed files with 9 additions and 7 deletions
|
@ -9,3 +9,6 @@ gtk = { version = "0.9.2", package = "gtk4", features = ["v4_16"] }
|
|||
|
||||
[build-dependencies]
|
||||
glib-build-tools = "0.20.0"
|
||||
|
||||
[profile.dev]
|
||||
split-debuginfo = "unpacked"
|
||||
|
|
13
meson.build
13
meson.build
|
@ -52,6 +52,10 @@ else
|
|||
endif
|
||||
|
||||
cargo = find_program('cargo')
|
||||
cargo_env = environment()
|
||||
cargo_env.set('MESON_BUILD_ROOT', meson.project_build_root())
|
||||
cargo_env.append('RUSTFLAGS', '-L ' + fs.parent(audrey_c.full_path()), separator: ' ')
|
||||
|
||||
custom_target(
|
||||
'cargo-build',
|
||||
build_by_default: true,
|
||||
|
@ -61,19 +65,14 @@ custom_target(
|
|||
blueprints,
|
||||
],
|
||||
console: true,
|
||||
# means nothing (always stale and uncopied), we can't cp since env: drops the /bin/sh wrapper
|
||||
output: meson.project_name(),
|
||||
command: [
|
||||
'env',
|
||||
'RUSTFLAGS=-L ' + fs.parent(audrey_c.full_path()),
|
||||
'MESON_BUILD_ROOT=' + meson.project_build_root(),
|
||||
cargo,
|
||||
'build',
|
||||
rust_args,
|
||||
'--manifest-path', meson.project_source_root() / 'Cargo.toml',
|
||||
'--target-dir', meson.project_build_root() / 'cargo-target',
|
||||
'&&',
|
||||
'cp',
|
||||
'cargo-target' / rust_target / meson.project_name(),
|
||||
'@OUTPUT@',
|
||||
],
|
||||
env: cargo_env,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue