From 598395dcb6f0ddaef5fbb696dbd1daa3f04ecf5b Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Sat, 11 Jun 2022 17:14:46 -0400 Subject: [PATCH] buildsystem - add options for building tests and translations Change-Id: I514544a4fdf6909202f126009a5345c655c2eca5 --- meson.build | 8 ++++++-- meson_options.txt | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 3c75424..bd78b1d 100644 --- a/meson.build +++ b/meson.build @@ -56,7 +56,9 @@ foreach function : check_functions endforeach -subdir('po') +if get_option('build-translations') + subdir('po') +endif subdir('data') if get_option('build-tools') libxml = dependency('libxml-2.0', version: '>=2.4') @@ -65,7 +67,9 @@ if get_option('build-tools') gio = dependency('gio-2.0', required: false) subdir('src') endif -subdir('tests') +if get_option('build-tests') + subdir('tests') +endif configure_file( input: 'shared-mime-info.pc.in', diff --git a/meson_options.txt b/meson_options.txt index dbc4162..c5b7e5d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,6 +7,14 @@ option('build-tools', type: 'boolean', value: true, description: 'Build the update-mime-database tools. If set to false only the mime data is installed.', ) +option('build-translations', type: 'boolean', value: true, + description: 'Build the translations.' +) + +option('build-tests', type: 'boolean', value: true, + description: 'Build the test suite. If not set then there will be no \'test\' build target.', +) + option('xdgmime-path', type: 'string', value: './xdgmime', description: 'Path to the xdgmime executable', ) -- GitLab