meson: add option to disable tracer hooks
authorTim-Philipp Müller <tim@centricular.com>
Wed, 5 Jul 2017 12:20:19 +0000 (13:20 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 5 Jul 2017 12:27:48 +0000 (13:27 +0100)
gst/meson.build
meson_options.txt
plugins/meson.build
tests/check/meson.build

index d57757e..2b6b6ee 100644 (file)
@@ -195,6 +195,11 @@ libgst_c_args = gst_c_args + [
   '-DGST_DISABLE_DEPRECATED',
 ]
 
+disable_tracer_hooks = get_option('disable_tracer_hooks')
+if disable_tracer_hooks
+  libgst_c_args += ['-DGST_DISABLE_GST_TRACER_HOOKS']
+endif
+
 # Make it possible to build both static and shared versions
 # at the same time. By default use shared for unit tests etc.
 # This choice is arbitrary.
index 9c77706..5f4ac2b 100644 (file)
@@ -4,6 +4,7 @@ option('disable_gtkdoc', type : 'boolean', value : false)
 option('disable_examples', type : 'boolean', value : false)
 option('disable_gst_debug', type : 'boolean', value : false)
 option('disable_registry', type : 'boolean', value : false)
+option('disable_tracer_hooks', type : 'boolean', value : false)
 option('library_format', type : 'combo', choices : ['shared', 'static', 'both'], value : 'shared')
 option('disable_introspection',
         type : 'boolean', value : false,
index 5013c58..cb65dc0 100644 (file)
@@ -1,2 +1,4 @@
 subdir('elements')
-subdir('tracers')
+if not disable_tracer_hooks
+  subdir('tracers')
+endif
index dae74cd..af473c7 100644 (file)
@@ -47,7 +47,7 @@ core_tests = [
   [ 'gst/gsttask.c' ],
   [ 'gst/gsttoc.c' ],
   [ 'gst/gsttocsetter.c' ],
-  [ 'gst/gsttracerrecord.c' ],
+  [ 'gst/gsttracerrecord.c', disable_tracer_hooks or disable_gst_debug],
   [ 'gst/gsturi.c' ],
   [ 'gst/gstutils.c', not have_registry ],
   [ 'gst/gstvalue.c' ],