summaryrefslogtreecommitdiff
path: root/overlay/meson.build
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2017-12-18 23:00:54 +0000
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2017-12-22 11:17:37 +0000
commit865a47ca2b93b208ba016f3c4fc00831ec7bfec6 (patch)
treefae09896c77b2d7c3ccd9989e23d5dc041442888 /overlay/meson.build
parentbeb26d89ff5c5621c1e6b6ac2a45439507af86b7 (diff)
overlay: parse tracepoints from sysfs to figure out fields' location
With changes going to drm-tip, the tracepoints field locations are going to change. This change introduces a tracepoint parser (using a peg parser) which lets us figure out field positions on the fly. v2: Fix automake build (Lionel) v3: Make overlay build conditional on peg (Petri) Make wait_end callback more readable (Chris) Drop tracepoint_id(), instead parsing from format file (Lionel) v4: Fix existing configure.ac issue with overlay build (Petri) v5: Silence unused function (Lionel) v6: Fix missing double quote in v4 (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk> For the build system changes: Acked-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'overlay/meson.build')
-rw-r--r--overlay/meson.build13
1 files changed, 12 insertions, 1 deletions
diff --git a/overlay/meson.build b/overlay/meson.build
index afacff5e..8b5c52b4 100644
--- a/overlay/meson.build
+++ b/overlay/meson.build
@@ -51,7 +51,18 @@ gpu_overlay_src += both_x11_src
gpu_overlay_src += 'kms/kms-overlay.c'
-if xrandr.found() and cairo.found()
+leg = find_program('leg', required : false)
+if leg.found()
+ leg_file = custom_target('tracepoint_format',
+ output: 'tracepoint_format.h',
+ input: 'tracepoint_format.leg',
+ command: [leg, '-P', '-o', '@OUTPUT@', '@INPUT@'])
+ gpu_overlay_src += leg_file
+else
+ warning('leg command not found, disabling overlay; try : apt-get install peg')
+endif
+
+if leg.found() and xrandr.found() and cairo.found()
executable('intel-gpu-overlay', gpu_overlay_src,
include_directories : inc,
c_args : gpu_overlay_cflags,