summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-02-24 10:38:06 +1000
committerGitHub <noreply@github.com>2021-02-24 10:38:06 +1000
commit99d06b4090a013e3912d9a4e5e1c717e3f5b87ce (patch)
tree028301025f970bffc103af4b30c5a274ad644888 /meson.build
parent4934448a865467523c2f53c21a488a9a7240a4d3 (diff)
downloadlibwacom-99d06b4090a013e3912d9a4e5e1c717e3f5b87ce.tar.gz
tools: add a libwacom-show-stylus tool to easily check for stylus IDs (#340)
This is an interactive tool to allow users to easily find their stylus IDs. libinput debug-tablet provides something similar but it's useful to have this as part of our own repository. After ctrl+c it prints a suggested Styli line with the set of groups that belong to this tablet. This is the quick-and-dirty version, probably good enough for most cases. Example output from running without arguments: $ sudo libwacom-show-stylus Using "Wacom Intuos Pro M Pen": /dev/input/event23 Tool id 0x842 serial 0x748012bf in-proximity: False Tool id 0x84a serial 0x748012bf in-proximity: False ^CTerminating Suggested line for .tablet file: Styli=mobilestudio Nice side-effect: where a prefix is configured but does not (yet) have files in it, we fall back to the default /usr/share. Too niche to worry about, imo. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 10 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 6d9552f..8036efb 100644
--- a/meson.build
+++ b/meson.build
@@ -4,6 +4,7 @@ project('libwacom', 'c',
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version: '>= 0.50.0')
+dir_bin = join_paths(get_option('prefix'), get_option('bindir'))
dir_data = join_paths(get_option('prefix'), get_option('datadir'), 'libwacom')
dir_etc = join_paths(get_option('prefix'), get_option('sysconfdir'), 'libwacom')
dir_man1 = join_paths(get_option('prefix'), get_option('mandir'), 'man1')
@@ -172,6 +173,15 @@ install_man(configure_file(input: 'tools/libwacom-list-local-devices.man',
output: '@BASENAME@.1',
copy: true))
+showstylus_config = configuration_data()
+showstylus_config.set('DATADIR', dir_data)
+showstylus_config.set('ETCDIR', dir_etc)
+configure_file(output: 'libwacom-show-stylus',
+ input: 'tools/show-stylus.py',
+ configuration: showstylus_config,
+ install_dir: dir_bin,
+ install: true)
+
############### docs ###########################
docs_feature = get_option('documentation')
doxygen = find_program('doxygen', required: docs_feature)