meson: tracers: signal availability of libunwind and backtrace() to code
[platform/upstream/gstreamer.git] / plugins / tracers / meson.build
1 gst_tracers_sources = [
2   'gstlatency.c',
3   'gstleaks.c',
4   'gststats.c',
5   'gsttracers.c',
6   'gstlog.c'
7 ]
8
9 if have_getrusage
10   gst_tracers_sources += ['gstrusage.c']
11 endif
12
13 tracers_args = gst_c_args + ['-DGST_USE_UNSTABLE_API']
14
15 unwind_dep = dependency('libunwind', required : false)
16 if unwind_dep.found()
17   tracers_args += ['-DHAVE_UNWIND']
18 endif
19
20 if cc.has_header('execinfo.h') and cc.has_function('backtrace', prefix : '#include <execinfo.h>')
21   tracers_args += ['-DHAVE_BACKTRACE']
22 endif
23
24 gst_tracers = library('gstcoretracers',
25   gst_tracers_sources,
26   c_args : tracers_args,
27   include_directories : [configinc],
28   dependencies : [gst_dep, unwind_dep],
29   link_with : printf_lib,
30   install : true,
31   install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
32 )
33