diff --git a/data/meson.build b/data/meson.build index f37c388..c90a991 100644 --- a/data/meson.build +++ b/data/meson.build @@ -36,7 +36,7 @@ appdata = i18n.merge_file('appdata', po_dir: podir, ) -desktop_file_validate = find_program('desktop-file-validate', required: false, native: true) +desktop_file_validate = find_program('desktop-file-validate', required: get_option('tests'), native: true) if desktop_file_validate.found() test('validate-desktop', desktop_file_validate, @@ -44,7 +44,7 @@ if desktop_file_validate.found() ) endif -appstream_util = find_program('appstream-util', required: false, native: true) +appstream_util = find_program('appstream-util', required: get_option('tests'), native: true) if appstream_util.found() test('validate-appdata', appstream_util, diff --git a/meson_options.txt b/meson_options.txt index 4e59f2f..667fbcf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -23,3 +23,8 @@ option('manpages', value: 'auto', description: 'manual pages' ) +option('tests', + type: 'feature', + value: 'auto', + description: 'run tests' +) diff --git a/tests/meson.build b/tests/meson.build index 9e752f4..c99a5ab 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,4 +1,4 @@ -check = dependency('check', required: false) +check = dependency('check', required: get_option('tests')) if check.found() test_dependencies = [ declare_dependency(link_with: libzathura),