diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2016-09-26 18:21:19 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2016-09-26 18:27:00 -0300 |
commit | c4aed66effd5cb530d70378a55880b03696f1f68 (patch) | |
tree | 9d87ec4f5aedf8f5ac7c5a900cea0b0012d10815 | |
parent | 618f925edc78c9fa77170f6a2d8d3c839f79228d (diff) |
meson: Build tracers
-rw-r--r-- | config.h.meson | 2 | ||||
-rw-r--r-- | meson.build | 8 | ||||
-rw-r--r-- | plugins/meson.build | 3 | ||||
-rw-r--r-- | plugins/tracers/meson.build | 22 |
4 files changed, 33 insertions, 2 deletions
diff --git a/config.h.meson b/config.h.meson index 89dad7129..15a5de7f3 100644 --- a/config.h.meson +++ b/config.h.meson @@ -436,3 +436,5 @@ #mesondefine HAVE_ALARM #mesondefine HAVE_DECL_LOCALTIME_R #mesondefine HAVE_DECL_STRSIGNAL +#mesondefine HAVE_GETRUSAGE +#mesondefine HAVE_SYS_RESOURCE_H diff --git a/meson.build b/meson.build index 28aeb731a..e2f87036f 100644 --- a/meson.build +++ b/meson.build @@ -120,6 +120,7 @@ check_headers = [['dlfcn.h','HAVE_DLFCN_H'], ['ucontext.h', 'HAVE_UCONTEXT_H'], ['unistd.h', 'HAVE_UNISTD_H'], ['valgrind/valgrind.h', 'HAVE_VALGRIND_VALGRIND_H'], + ['sys/resource.h', 'HAVE_SYS_RESOURCE_H'], ] if host_machine.system() == 'windows' @@ -153,6 +154,11 @@ endif if cc.has_function('sigaction', prefix : '#include<signal.h>') cdata.set('HAVE_SIGACTION', 1) endif +have_getrusage = cc.has_function('getrusage', prefix : '#include <sys/time.h>\n#include <sys/resource.h>') +if have_getrusage + cdata.set('HAVE_GETRUSAGE', 1) +endif + if cc.has_function('fseeko', prefix : '#include<stdio.h>') cdata.set('HAVE_FSEEKO', 1) endif @@ -243,6 +249,8 @@ 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 diff --git a/plugins/meson.build b/plugins/meson.build index 83e7a6de5..5013c5804 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,3 +1,2 @@ subdir('elements') -# FIXME: not implemented -#subdir('tracers') +subdir('tracers') diff --git a/plugins/tracers/meson.build b/plugins/tracers/meson.build new file mode 100644 index 000000000..6f7f9cc83 --- /dev/null +++ b/plugins/tracers/meson.build @@ -0,0 +1,22 @@ +gst_tracers_sources = [ + 'gstlatency.c', + 'gstleaks.c', + 'gststats.c', + 'gsttracers.c', + 'gstlog.c' +] + +if have_getrusage + gst_tracers_sources += ['gstrusage.c'] +endif + +gst_tracers = library('gstcoretracers', + gst_tracers_sources, + c_args : gst_c_args + ['-DGST_USE_UNSTABLE_API'], + include_directories : [configinc], + dependencies : [gst_dep, unwind_dep], + link_with : printf_lib, + install : true, + install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')), +) + |