Add an option to disable tests
authorThibault Saunier <tsaunier@igalia.com>
Mon, 25 Feb 2019 14:12:23 +0000 (11:12 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Mon, 25 Feb 2019 16:28:51 +0000 (13:28 -0300)
ges/meson.build
meson_options.txt [new file with mode: 0644]
sources/meson.build

index 092b72d..b00d553 100644 (file)
@@ -16,7 +16,7 @@ configure_file(
     output: pkg + '-sharp.dll.config',
     configuration: configuration_data())
 
-if add_languages('c', required: false) and csc.get_id() == 'mono'
+if add_languages('c', required: get_option('tests')) and csc.get_id() == 'mono'
     c_abi_exe = executable(pkg + '_c_abi', c_abi,
             c_args: ['-Wno-deprecated', '-Wno-deprecated-declarations'],
             dependencies: [gst_deps, ges_dep])
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644 (file)
index 0000000..b27c329
--- /dev/null
@@ -0,0 +1 @@
+option('tests', type : 'feature', value : 'auto', yield : true)
\ No newline at end of file
index 6b44a7d..a08dc0d 100644 (file)
@@ -41,7 +41,7 @@ gst_sharp = shared_library('gstreamer-sharp', gst_generate_files, sources,
 gst_sharp_dep = declare_dependency(dependencies: [glib_sharp_dep, gio_sharp_dep],
         link_with: gst_sharp)
 
-if add_languages('c', required: false) and csc.get_id() == 'mono'
+if add_languages('c', required: get_option('tests')) and csc.get_id() == 'mono'
     c_abi_exe = executable('gst_sharp_c_abi', c_abi,
             c_args: ['-DGST_USE_UNSTABLE_API'],
             dependencies: [gst_deps])