meson: simplify GST_DISABLE_GST_DEBUG check some more

This commit is contained in:
Tim-Philipp Müller 2018-02-21 19:42:19 +00:00
parent 5b18f7fa1f
commit 34084df96a

View file

@ -116,16 +116,12 @@ plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
if gst_dep.type_name() == 'internal'
gst_debug_disabled = subproject('gstreamer').get_variable('disable_gst_debug')
else
# We can't check that in the case of subprojects as we won't
# We can't check that in the case of subprojects as we won't
# be able to build against an internal dependency (which is not built yet)
gst_debug_disabled = not cc.compiles('''#include <gst/gstconfig.h>
#ifdef GST_DISABLE_GST_DEBUG
#error "debugging disabled, make compiler fail"
#endif''', dependencies: gst_dep)
gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
endif
if gst_debug_disabled and cc.has_argument('-Wno-unused')
message('GStreamer debug system is disabled')
add_project_arguments('-Wno-unused', language: 'c')
endif