meson.build: allow disabling building the various tools

A bit of a niche case but this helps with embedding libevdev as static
library when the tools don't matter.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2024-03-13 13:56:16 +10:00
parent d852e59dd0
commit 1ee2399ba8
2 changed files with 34 additions and 28 deletions

View file

@ -101,6 +101,7 @@ install_man(manpage)
# tools
if not get_option('tools').disabled()
executable('libevdev-events',
sources: ['tools/libevdev-events.c'],
include_directories: [includes_include],
@ -129,6 +130,7 @@ executable('libevdev-tweak-device',
install_man('tools/libevdev-tweak-device.1',
'tools/touchpad-edge-detector.1',
'tools/mouse-dpi-tool.1')
endif
# tests
dep_check = dependency('check', version: '>= 0.9.9',

View file

@ -2,6 +2,10 @@ option('tests',
type: 'feature',
value: 'enabled',
description: 'Build the tests')
option('tools',
type: 'feature',
value: 'enabled',
description: 'Build the tools')
option('documentation',
type: 'feature',
value: 'enabled',