From a4772ce3194484c56595a8f5e9c0535fd86254fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 21 Jun 2023 18:38:01 +0200 Subject: Improve native MSYS2 build compatibility --- meson.build | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 4b578fd..e1d9e5f 100644 --- a/meson.build +++ b/meson.build @@ -139,7 +139,8 @@ if win32 '--width', size, '--height', size, '@INPUT@']) endforeach - icon_ico = custom_target(input : icon_png_list, output : 'fiv.ico', + icon_ico = custom_target('fiv.ico', + output : 'fiv.ico', input : icon_png_list, command : [icotool, '-c', '-o', '@OUTPUT@', '@INPUT@']) rc += windows.compile_resources('fiv.rc', depends : icon_ico) endif @@ -207,16 +208,21 @@ endforeach # For the purposes of development: make the program find its GSettings schemas. gnome.compile_schemas(depend_files : files(gsettings_schemas)) -# Validate various files, if there are tools around to do it. -xmls = ['fiv.svg', 'fiv.manifest', 'resources/resources.gresource.xml'] + \ - gsettings_schemas -xmls += run_command(find_program('sed', required : false, disabler : true), - '-n', 's@.*>\([^<>]*[.]svg\)<.*@resources/\\1@p', +# Meson is broken on Windows and removes the backslashes, so this ends up empty. +symbolics = run_command(find_program('sed', required : false, disabler : true), + '-n', 's@.*>\\([^<>]*[.]svg\\)<.*@resources/\\1@p', configure_file( input : 'resources/resources.gresource.xml', output : 'resources.gresource.xml.stamp', copy : true, - ), capture : true, check : true).stdout().strip().split('\n') + ), capture : true, check : true).stdout().strip() + +# Validate various files, if there are tools around to do it. +xmls = ['fiv.svg', 'fiv.manifest', 'resources/resources.gresource.xml'] + \ + gsettings_schemas +if symbolics != '' + xmls += symbolics.split('\n') +endif xmlwf = find_program('xmlwf', required : false, disabler : true) xmllint = find_program('xmllint', required : false, disabler : true) -- cgit v1.2.3