Commit 9791669a authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

meson: tracers: signal availability of libunwind and backtrace() to code

Not setting cdata here on purpose because of .. complications.
parent c4aed66e
......@@ -249,7 +249,6 @@ if host_machine.system() == 'windows'
else
gio_dep = [dependency('gio-2.0'), dependency('gio-unix-2.0')]
endif
unwind_dep = dependency('libunwind', required : false)
mathlib = cc.find_library('m', required : false)
rt_lib = cc.find_library('rt', required : false) # clock_gettime
......
......@@ -10,9 +10,20 @@ if have_getrusage
gst_tracers_sources += ['gstrusage.c']
endif
tracers_args = gst_c_args + ['-DGST_USE_UNSTABLE_API']
unwind_dep = dependency('libunwind', required : false)
if unwind_dep.found()
tracers_args += ['-DHAVE_UNWIND']
endif
if cc.has_header('execinfo.h') and cc.has_function('backtrace', prefix : '#include <execinfo.h>')
tracers_args += ['-DHAVE_BACKTRACE']
endif
gst_tracers = library('gstcoretracers',
gst_tracers_sources,
c_args : gst_c_args + ['-DGST_USE_UNSTABLE_API'],
c_args : tracers_args,
include_directories : [configinc],
dependencies : [gst_dep, unwind_dep],
link_with : printf_lib,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment