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

@ -118,14 +118,10 @@ if gst_dep.type_name() == 'internal'
else 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) # be able to build against an internal dependency (which is not built yet)
gst_debug_disabled = not cc.compiles('''#include <gst/gstconfig.h> gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
#ifdef GST_DISABLE_GST_DEBUG
#error "debugging disabled, make compiler fail"
#endif''', dependencies: gst_dep)
endif endif
if gst_debug_disabled and cc.has_argument('-Wno-unused') if gst_debug_disabled and cc.has_argument('-Wno-unused')
message('GStreamer debug system is disabled')
add_project_arguments('-Wno-unused', language: 'c') add_project_arguments('-Wno-unused', language: 'c')
endif endif