From 7be5b7b99e009c51ef4106bee656c9773da0e520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 12 Aug 2018 18:12:35 +0100 Subject: [PATCH] meson: add build options to disable tools and tests --- meson.build | 5 ++++- meson_options.txt | 2 ++ tests/meson.build | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index ab5c8cfb93..d0873cd14a 100644 --- a/meson.build +++ b/meson.build @@ -283,6 +283,7 @@ gst_net_dep = dependency('gstreamer-net-1.0', version : gst_req, fallback : ['gstreamer', 'gst_net_dep']) if host_system != 'windows' gst_check_dep = dependency('gstreamer-check-1.0', version : gst_req, + required : get_option('tests'), fallback : ['gstreamer', 'gst_check_dep']) endif gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req, @@ -356,7 +357,9 @@ subdir('gst-libs') subdir('gst') subdir('ext') subdir('sys') -subdir('tools') +if not get_option('tools').disabled() + subdir('tools') +endif subdir('tests') subdir('pkgconfig') diff --git a/meson_options.txt b/meson_options.txt index ec8061b0e1..b0f8474f53 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -56,6 +56,8 @@ option('xvideo', type : 'feature', value : 'auto', description : 'X11 XVideo xvi # Common feature options option('examples', type : 'feature', value : 'auto', yield : true) +option('tests', type : 'feature', value : 'auto', yield : true) +option('tools', type : 'feature', value : 'auto', yield : true) option('gtk_doc', type : 'feature', value : 'auto', yield : true, description : 'Build 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)') diff --git a/tests/meson.build b/tests/meson.build index 382f8f8efc..bf201d64b1 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,6 +1,8 @@ # FIXME: make check work on windows if host_machine.system() != 'windows' - subdir('check') + if not get_option('tests').disabled() and gst_check_dep.found() + subdir('check') + endif endif if not get_option('examples').disabled() subdir('examples')