meson: Support building with Gst debug disabled
authorThibault Saunier <tsaunier@gnome.org>
Fri, 9 Dec 2016 20:55:39 +0000 (17:55 -0300)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 9 Dec 2016 20:57:10 +0000 (17:57 -0300)
meson.build
plugins/tracers/meson.build
tests/check/meson.build

index 19c3639..034c740 100644 (file)
@@ -316,6 +316,12 @@ if cc.has_header('execinfo.h')
   endif
 endif
 
+disable_gst_debug = get_option('disable_gst_debug')
+if get_option('disable_gst_debug')
+    cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
+  add_project_arguments(['-Wno-unused'], language: 'c')
+endif
+
 configure_file(input : 'config.h.meson',
   output : 'config.h',
   configuration : cdata)
index b66d47d..34a90d6 100644 (file)
@@ -3,9 +3,12 @@ gst_tracers_sources = [
   'gstleaks.c',
   'gststats.c',
   'gsttracers.c',
-  'gstlog.c'
 ]
 
+if not disable_gst_debug
+  gst_tracers_source += ['gstlog.c']
+endif
+
 if have_getrusage
   gst_tracers_sources += ['gstrusage.c']
 endif
index c0c8d4d..7d764eb 100644 (file)
@@ -30,7 +30,7 @@ core_tests = [
   [ 'gst/gstobject.c' ],
   [ 'gst/gstpad.c', not have_registry ],
   [ 'gst/gstparamspecs.c' ],
-  [ 'gst/gstprintf.c', not have_debug ],
+  [ 'gst/gstprintf.c', disable_gst_debug],
   [ 'gst/gstpipeline.c', not have_registry ],
   [ 'gst/gstpoll.c' ],
   [ 'gst/gstplugin.c', not have_registry ],