meson: add options to disable tests, examples, benchmarks and tools

And remove duplicate option 'poisoning' and unused 'build_tools' one.
This commit is contained in:
Tim-Philipp Müller 2018-08-09 23:32:49 +01:00
parent 7ef5b28e40
commit e5ad55d649
3 changed files with 15 additions and 6 deletions

View file

@ -460,7 +460,9 @@ endif
subdir('gst')
subdir('libs')
subdir('plugins')
subdir('tools')
if not get_option('tools').disabled()
subdir('tools')
endif
subdir('pkgconfig')
subdir('tests')
subdir('data')

View file

@ -1,5 +1,3 @@
option('build_tools', type : 'boolean', value : true)
option('poisoning', type : 'boolean', value : false)
option('gst_debug', type : 'boolean', value : true)
option('registry', type : 'boolean', value : true)
option('tracer_hooks', type : 'boolean', value : true)
@ -18,6 +16,9 @@ option('bash-completion', type : 'feature', value : 'auto', description : 'Insta
# Common feature options
option('examples', type : 'feature', value : 'auto', yield : true)
option('tests', type : 'feature', value : 'auto', yield : true)
option('benchmarks', type : 'feature', value : 'auto', yield : true)
option('tools', type : 'feature', value : 'auto', yield : true)
option('gtk_doc', type : 'feature', value : 'auto', yield : true, description : 'Generate API documentation with gtk-doc')
option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')

View file

@ -1,6 +1,12 @@
subdir('benchmarks')
subdir('check')
if not get_option('benchmarks').disabled()
subdir('benchmarks')
endif
if not get_option('tests').disabled()
subdir('check')
endif
if not get_option('examples').disabled()
subdir('examples')
endif
subdir('misc')
if not get_option('tools').disabled()
subdir('misc')
endif