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]
|
[build-dependencies]
|
||||||
glib-build-tools = "0.20.0"
|
glib-build-tools = "0.20.0"
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
split-debuginfo = "unpacked"
|
||||||
|
|
13
meson.build
13
meson.build
|
@ -52,6 +52,10 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cargo = find_program('cargo')
|
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(
|
custom_target(
|
||||||
'cargo-build',
|
'cargo-build',
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
|
@ -61,19 +65,14 @@ custom_target(
|
||||||
blueprints,
|
blueprints,
|
||||||
],
|
],
|
||||||
console: true,
|
console: true,
|
||||||
|
# means nothing (always stale and uncopied), we can't cp since env: drops the /bin/sh wrapper
|
||||||
output: meson.project_name(),
|
output: meson.project_name(),
|
||||||
command: [
|
command: [
|
||||||
'env',
|
|
||||||
'RUSTFLAGS=-L ' + fs.parent(audrey_c.full_path()),
|
|
||||||
'MESON_BUILD_ROOT=' + meson.project_build_root(),
|
|
||||||
cargo,
|
cargo,
|
||||||
'build',
|
'build',
|
||||||
rust_args,
|
rust_args,
|
||||||
'--manifest-path', meson.project_source_root() / 'Cargo.toml',
|
'--manifest-path', meson.project_source_root() / 'Cargo.toml',
|
||||||
'--target-dir', meson.project_build_root() / 'cargo-target',
|
'--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