diff --git a/static/meson.build b/static/meson.build index a9f9099be..b650cabcd 100644 --- a/static/meson.build +++ b/static/meson.build @@ -1,8 +1,18 @@ -resource_files = run_command(res_manager, - '--list-all', - files('resources_list.txt'), - check: true - ).stdout().strip().split('\n') +if meson.version().version_compare('>=0.47.0') + resource_files = run_command( + res_manager, + '--list-all', + files('resources_list.txt'), + check: true + ).stdout().strip().split('\n') +else + resource_files = run_command( + res_manager, + '--list-all', + files('resources_list.txt') + ).stdout().strip().split('\n') +endif + preprocessed_resources = custom_target('preprocessed_resource_files', input: 'resources_list.txt', @@ -31,12 +41,24 @@ lib_resources = custom_target('resources', # i18n_resource_files = fs.read('i18n_resources_list.txt').strip().split('\n') # ``` # once we move to meson >= 0.57.0 -i18n_resource_files = run_command(find_program('python3'), - '-c', - 'import sys; f=open(sys.argv[1]); print(f.read())', - files('i18n_resources_list.txt'), - check: true - ).stdout().strip().split('\n') + +if meson.version().version_compare('>=0.47.0') + i18n_resource_files = run_command( + find_program('python3'), + '-c', + 'import sys; f=open(sys.argv[1]); print(f.read())', + files('i18n_resources_list.txt'), + check: true + ).stdout().strip().split('\n') +else + i18n_resource_files = run_command( + find_program('python3'), + '-c', + 'import sys; f=open(sys.argv[1]); print(f.read())', + files('i18n_resources_list.txt'), + ).stdout().strip().split('\n') +endif + i18n_resources = custom_target('i18n_resources', input: i18n_resource_files,