Files

28 lines
1.1 KiB
Meson

# One target per blueprint file, each writing exactly one .ui.
#
# The other obvious approach — a single `batch-compile` with `output: '.'` —
# makes the *directory* the target's output, which then becomes an input of the
# resource bundle: the bundle looks stale every time it writes into that
# directory (so it is regenerated on every build), and adding a file to the batch
# makes ninja fail to clean the stale output with "remove(...): Directory not
# empty". Meson forbids a path segment in `output`, so the .ui files land beside
# this file in the build directory and the resource paths are their plain names.
blueprints = []
foreach name : ['window', 'keys']
blueprints += custom_target(
name + '_ui',
input: 'ui' / (name + '.blp'),
output: name + '.ui',
command: [blueprint_compiler, 'compile', '--output', '@OUTPUT@', '@INPUT@'],
)
endforeach
gnome.compile_resources(app_id,
'resources.gresource.xml',
dependencies: blueprints,
source_dir: [meson.current_build_dir(), meson.current_source_dir()],
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)