aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-06-21 18:38:01 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-06-21 18:38:30 +0200
commita4772ce3194484c56595a8f5e9c0535fd86254fd (patch)
treee7577d1e2d47e2a708a5af99b7d6dbe47dac7185
parent0318424540d3cfd2fce15c6999066beb4d80c44d (diff)
downloadfiv-a4772ce3194484c56595a8f5e9c0535fd86254fd.tar.gz
fiv-a4772ce3194484c56595a8f5e9c0535fd86254fd.tar.xz
fiv-a4772ce3194484c56595a8f5e9c0535fd86254fd.zip
Improve native MSYS2 build compatibility
-rw-r--r--meson.build20
1 files 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)