diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2021-01-24 11:45:52 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2021-03-02 08:22:58 +0000 |
commit | 6148b0ced86e37aa461eb4a399a6573e2bc687fd (patch) | |
tree | a59f81325f337c0f5e5e5619235f91e0197fb0eb | |
parent | 82afb685a478a4051541e21f7f0b9c23c54cc787 (diff) | |
download | shared-mime-info-6148b0ced86e37aa461eb4a399a6573e2bc687fd.tar.gz |
meson: make xmlto optional, build spec only if found
Refs https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/150
-rw-r--r-- | data/meson.build | 22 | ||||
-rw-r--r-- | meson.build | 2 |
2 files changed, 13 insertions, 11 deletions
diff --git a/data/meson.build b/data/meson.build index 263567d9..24361c97 100644 --- a/data/meson.build +++ b/data/meson.build @@ -22,14 +22,16 @@ install_data( install_dir : get_option('datadir') / 'gettext/its' ) -custom_target('shared-mime-info-spec-html', - input : 'shared-mime-info-spec.xml', - output: 'shared-mime-info-spec-html', - command: [ - xmlto, - '-o', '@OUTPUT@', - 'html-nochunks', - '@INPUT@', - ], - build_by_default: true, +if xmlto.found() + custom_target('shared-mime-info-spec-html', + input : 'shared-mime-info-spec.xml', + output: 'shared-mime-info-spec-html', + command: [ + xmlto, + '-o', '@OUTPUT@', + 'html-nochunks', + '@INPUT@', + ], + build_by_default: true, ) +endif diff --git a/meson.build b/meson.build index 9a28573e..0d08c8a0 100644 --- a/meson.build +++ b/meson.build @@ -22,7 +22,7 @@ config.set_quoted('VERSION', meson.project_version()) itstool = find_program('itstool') xmllint = find_program('xmllint') -xmlto = find_program('xmlto') +xmlto = find_program('xmlto', required: false) ############################################################################### # Find xdgmime |