meson: add glib-checks option to disable API guards and such
[platform/upstream/gstreamer.git] / meson.build
index 9013477..7f786e9 100644 (file)
@@ -230,6 +230,12 @@ if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
   add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
 endif
 
+glib_checks = get_option('glib-checks')
+if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
+  message('Disabling GLib checks')
+  add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
+endif
+
 presetdir = join_paths(get_option('datadir'), 'gstreamer-' + api_version, 'presets')
 
 pkgconfig = import('pkgconfig')