include_directories('parse')],
install : true,
link_with : printf_lib,
- dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, unwind_dep, dw_dep] + platform_deps,
+ dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib] + backtrace_deps + platform_deps,
)
libgst = libgst_static
endif
include_directories('parse')],
link_with : printf_lib,
install : true,
- dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep,
- unwind_dep, dw_dep] + platform_deps,
+ dependencies : [gobject_dep, gmodule_dep, glib_dep, mathlib, dl_dep] + backtrace_deps
+ + platform_deps,
vs_module_defs: vs_module_defs_dir + 'libgstreamer.def',
)
libgst = libgst_shared
platform_deps = [cc.find_library('ws2_32')]
endif
-unwind_dep = dependency('libunwind', required : false)
-dw_dep = dependency('libdw', required: false)
-if unwind_dep.found()
- cdata.set('HAVE_UNWIND', 1)
- if dw_dep.found()
- cdata.set('HAVE_DW', 1)
- else
- message('Support for backtraces is partial only.')
- endif
-else
- if cc.has_function('backtrace')
- cdata.set('HAVE_BACKTRACE', 1)
+backtrace_deps = []
+if not get_option('disable_libunwind')
+ unwind_dep = dependency('libunwind', required : false)
+ dw_dep = dependency('libdw', required: false)
+ backtrace_deps = [unwind_dep, dw_dep]
+ if unwind_dep.found()
+ cdata.set('HAVE_UNWIND', 1)
+ if dw_dep.found()
+ cdata.set('HAVE_DW', 1)
+ else
+ message('Support for backtraces is partial only.')
+ endif
else
- message('NO backtraces support.')
+ if cc.has_function('backtrace')
+ cdata.set('HAVE_BACKTRACE', 1)
+ else
+ message('NO backtraces support.')
+ endif
endif
endif
option('disable_introspection',
type : 'boolean', value : false,
description : 'Whether to disable the introspection generation')
+option('disable_libunwind',
+ type : 'boolean', value : false,
+ description : 'Whether to disable the usage of libunwind (to generate backtraces)')