meson fmt

This commit is contained in:
psykose 2024-10-30 04:28:11 +01:00
parent a8453e6e3d
commit 59eba426d2
2 changed files with 31 additions and 18 deletions

View file

@ -54,16 +54,17 @@ endif
cargo = find_program('cargo') cargo = find_program('cargo')
cargo_env = environment() cargo_env = environment()
cargo_env.set('MESON_BUILD_ROOT', meson.project_build_root()) cargo_env.set('MESON_BUILD_ROOT', meson.project_build_root())
cargo_env.append('RUSTFLAGS', '-L ' + fs.parent(audrey_c.full_path()), separator: ' ') 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,
build_always_stale: true, build_always_stale: true,
depends: [ depends: [audrey_c, blueprints],
audrey_c,
blueprints,
],
console: true, console: true,
# means nothing (always stale and uncopied), we can't cp since env: drops the /bin/sh wrapper # 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(),
@ -71,17 +72,12 @@ custom_target(
cargo, cargo,
'build', 'build',
rust_args, rust_args,
'--manifest-path', meson.project_source_root() / 'Cargo.toml', '--manifest-path',
'--target-dir', meson.project_build_root() / 'cargo-target', meson.project_source_root() / 'Cargo.toml',
'--target-dir',
meson.project_build_root() / 'cargo-target',
], ],
env: cargo_env, env: cargo_env,
) )
run_target( run_target('clippy', command: [cargo, 'clippy'], env: cargo_env)
'clippy',
command: [
cargo,
'clippy',
],
env: cargo_env,
)

View file

@ -1,7 +1,19 @@
blueprints = custom_target( blueprints = custom_target(
'blueprints', 'blueprints',
input: files('play_queue.blp', 'play_queue_song.blp', 'playbar.blp', 'setup.blp', 'window.blp'), input: files(
output: ['play_queue.ui', 'play_queue_song.ui', 'playbar.ui', 'setup.ui', 'window.ui'], 'play_queue.blp',
'play_queue_song.blp',
'playbar.blp',
'setup.blp',
'window.blp',
),
output: [
'play_queue.ui',
'play_queue_song.ui',
'playbar.ui',
'setup.ui',
'window.ui',
],
command: [ command: [
find_program('blueprint-compiler'), find_program('blueprint-compiler'),
'batch-compile', 'batch-compile',
@ -11,4 +23,9 @@ blueprints = custom_target(
], ],
) )
removeme = gnome.compile_resources('audrey-resources', 'audrey.gresource.xml', c_name: 'audrey', dependencies: blueprints) removeme = gnome.compile_resources(
'audrey-resources',
'audrey.gresource.xml',
c_name: 'audrey',
dependencies: blueprints,
)