summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2022-06-20 21:41:32 +0100
committerDavid Faure <faure@kde.org>2023-08-30 09:35:41 +0000
commit9b8ad99a33973e5ed70ad698f9a89f5779e19f16 (patch)
treeb472ccfbd8da0a2c0a39a81834c81ffca0de1598
parent3fb78a187c0bd1fa8bf7d4e574d10a665037adc8 (diff)
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.
-rw-r--r--meson.build2
-rw-r--r--tests/meson.build10
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'