From fcadacb0adc58b5d58a608ca68ebec91b9c2c1d8 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Tue, 14 Apr 2020 16:12:05 +0400 Subject: [PATCH] Resources are compiled as needed Correct dependencies are set up for resource compilation and build_always_stale is set to false. --- static/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/meson.build b/static/meson.build index 353f5266e..cf43624ea 100644 --- a/static/meson.build +++ b/static/meson.build @@ -1,3 +1,8 @@ +resource_files = run_command(find_program('python'), + '-c', + 'import sys; f=open(sys.argv[1]); print(f.read())', + files('resources_list.txt') + ).stdout().strip().split('\n') lib_resources = custom_target('resources', input: 'resources_list.txt', @@ -7,5 +12,5 @@ lib_resources = custom_target('resources', '--hfile', '@OUTPUT1@', '--source_dir', '@OUTDIR@', '@INPUT@'], - build_always_stale: true + depend_files: resource_files )