fix(meson): fix build with appstream-utils
@@ -29,15 +29,18 @@ appdata_file = i18n.merge_file ('appdata-file',
appstream_util = find_program('appstream-util', required: false)
+# We have to check if appstream util has been found here, or meson will die if he haven't found it
+if appstream_util.found()
# https://github.com/hughsie/appstream-glib/issues/146
appstream_min_version = '0.7.2'
appstream_ver_stdout = run_command([appstream_util, '--version'])
appstream_ver = appstream_ver_stdout.stdout().split(' ')[1].strip()
+
if appstream_ver.version_compare('<' + appstream_min_version)
# Using 'warning' here would be a good idea, but meson on Ubuntu 14.04 isn't recent enough.
message('WARN: Found appstream, but it is too old! Wanted >= @0@, found @1@'.format(appstream_ver, appstream_min_version))
-elif appstream_util.found()
+ else
test(
'validate-appdata', appstream_util,
args: [
@@ -45,6 +48,7 @@ elif appstream_util.found()
],
)
endif
+endif
install_data('com.github.Cogitri.gxi.gschema.xml', install_dir: join_paths(gxi_datadir, 'glib-2.0', 'schemas'))
