From 53e40ae81051525532c8d1199f2748707b3ec793 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 20 Jun 2022 21:41:32 +0100 Subject: [PATCH] Avoid meson errors when 'build-tools' is set to false If build-tools is set to false we do not set the update_mime_database value, so avoid referencing it in that case. --- meson.build | 2 +- tests/meson.build | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 3c75424..6d6f3f5 100644 --- a/meson.build +++ b/meson.build @@ -78,7 +78,7 @@ configure_file( ) if get_option('update-mimedb') - upd_tool = (meson.is_cross_build() + upd_tool = (meson.is_cross_build() or not get_option('build-tools') ? find_program('update-mime-database').path() : update_mime_database.full_path() ) diff --git a/tests/meson.build b/tests/meson.build index cdf0b73..a073abe 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -56,10 +56,12 @@ test('Case sensitivity', find_program('test-case-sensitivity.sh'), ) -test('update-mime-database', - update_mime_database, - args: meson.current_source_dir() / 'mime-db-tests', -) +if get_option('build-tools') + test('update-mime-database', + update_mime_database, + args: meson.current_source_dir() / 'mime-db-tests', + ) +endif its20_elements_rng = meson.source_root() / 'data/its/its20-elements.rng' shared_mime_info_its = meson.source_root() / 'data/its/shared-mime-info.its' -- GitLab