meson: fix a few warnings
authorTim-Philipp Müller <tim@centricular.com>
Mon, 7 Aug 2017 10:06:58 +0000 (11:06 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 7 Aug 2017 10:06:58 +0000 (11:06 +0100)
gst/meson.build
meson.build

index 2b6b6ee..e1ecea3 100644 (file)
@@ -148,7 +148,8 @@ gst_headers = [
 ]
 install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
 
-if not get_option('disable_registry')
+disable_registry = get_option('disable_registry')
+if not disable_registry
   gst_registry = ['gstregistrybinary.c']
 else
   gst_registry = []
@@ -158,6 +159,25 @@ endif
 # still add to the original cdata later.
 gst_cdata = cdata
 
+if disable_gst_debug
+  gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
+else
+  gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#undef GST_DISABLE_GST_DEBUG')
+endif
+
+if disable_registry
+  gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#define GST_DISABLE_REGISTRY 1')
+else
+  gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#undef GST_DISABLE_REGISTRY')
+endif
+
+# FIXME: add --disable-parse option? (but autotools doesn't seem to set this
+# define properly at all either even though it does expose the option)
+gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#undef GST_DISABLE_PARSE')
+
+# FIXME: add --disable-plugin option?
+gst_cdata.set('GST_DISABLE_PLUGIN_DEFINE', '#undef GST_DISABLE_PLUGIN')
+
 configure_file(input : 'gstconfig.h.in',
   output : 'gstconfig.h',
   install_dir : 'include/gstreamer-1.0/gst',
index 5941d7a..4f728f0 100644 (file)
@@ -320,8 +320,7 @@ if cc.has_header('execinfo.h')
 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')
+if disable_gst_debug
   add_project_arguments(['-Wno-unused'], language: 'c')
 endif