Resources are compiled as needed

Correct dependencies are set up for resource compilation and
build_always_stale is set to false.
This commit is contained in:
Veloman Yunkan 2020-04-14 16:12:05 +04:00
parent 8f07689c57
commit fcadacb0ad
1 changed files with 6 additions and 1 deletions

View File

@ -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', lib_resources = custom_target('resources',
input: 'resources_list.txt', input: 'resources_list.txt',
@ -7,5 +12,5 @@ lib_resources = custom_target('resources',
'--hfile', '@OUTPUT1@', '--hfile', '@OUTPUT1@',
'--source_dir', '@OUTDIR@', '--source_dir', '@OUTDIR@',
'@INPUT@'], '@INPUT@'],
build_always_stale: true depend_files: resource_files
) )