[PATCH libinput 5/5] Add meson.build file
Quentin Glidic
sardemff7+wayland at sardemff7.net
Wed Apr 26 09:26:17 UTC 2017
On 4/26/17 4:20 AM, Peter Hutterer wrote:
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> meson.build | 596 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> meson_options.txt | 16 ++
> 2 files changed, 612 insertions(+)
> create mode 100644 meson.build
> create mode 100644 meson_options.txt
I’m not reviewing the libinput aspect of this patch, only the Meson one.
> diff --git a/meson.build b/meson.build
> new file mode 100644
> index 0000000..a6cbb81
> --- /dev/null
> +++ b/meson.build
> @@ -0,0 +1,596 @@
> +project('libinput', 'c', 'cpp',
> + version : '1.7.0',
> + license: 'MIT/Expat',
> + default_options : [ 'c_std=gnu99' ],
> + meson_version : '>= 0.38.0')
> +
> +libinput_version = meson.project_version().split('.')
> +
> +# We use libtool-version numbers because it's easier to understand.
Actually it’s version-info, version-number is the equivalent to Meson
so_version.
> +# Before making a release, the libinput_so_*
> +# numbers should be modified. The components are of the form C:R:A.
> +# a) If binary compatibility has been broken (eg removed or changed interfaces)
> +# change to C+1:0:0.
> +# b) If interfaces have been changed or added, but binary compatibility has
> +# been preserved, change to C+1:0:A+1
> +# c) If the interface is the same as the previous version, change to C:R+1:A
> +libinput_lt_c=22
> +libinput_lt_r=2
> +libinput_lt_a=12
> +
> +# convert to soname
> +libinput_so_version = '@0 at .@1 at .@2@'.format((libinput_lt_c - libinput_lt_a),
> + libinput_lt_a, libinput_lt_r)
> +
> +# Compiler setup
> +cc = meson.get_compiler('c')
> +cppflags = ['-Wall', '-Wextra', '-Wno-unused-parameter', '-g', '-fvisibility=hidden']
> +cflags = cppflags + ['-Wmissing-prototypes', '-Wstrict-prototypes']
> +add_global_arguments(cflags, language: 'c')
> +add_global_arguments(cppflags, language: 'cpp')
> +
> +config_h = configuration_data()
> +config_h.set('_GNU_SOURCE', '1')
This one is set already by the "std=gnu99" you have.
> +code = '''
> +#define _GNU_SOURCE
> +#include <assert.h>
> +static_assert(1 == 1, "msg");
> +'''
> +if not cc.compiles(code,
> + name : 'static_assert check',
> + args : [ '-Werror' ])
> + config_h.set('static_assert(...)', '/* */')
There is cc.get_define('static_assert') (if static_assert is a #define,
don’t know) in Meson 0.40.0.
> +endif
> +
> +# Dependencies
> +pkgconfig = import('pkgconfig')
> +dep_udev = dependency('libudev')
> +dep_mtdev = dependency('mtdev', version: '>= 1.1.0')
> +dep_libevdev = dependency('libevdev', version: '>= 0.4')
> +dep_lm = cc.find_library('m')
> +dep_rt = cc.find_library('rt')
Both with required: false, since non-glibc doesn’t always require them?
> +
> +############ libwacom configuration ############
> +
> +if get_option('libwacom')
> + dep_libwacom = dependency('libwacom', version : '>= 0.20')
> +
> + code = '''
> + #include <libwacom/libwacom.h>
> + int main(void) { libwacom_get_paired_device(NULL); }
> + '''
> + result = cc.links(code,
> + args : '-lwacom',
It has dep_libwacom already, it shouldn’t be needed?
> + name : 'libwacom_get_paired_device check',
> + dependencies : dep_libwacom)
> + if result
> + config_h.set('HAVE_LIBWACOM_GET_PAIRED_DEVICE', '1')
.set01('HAVE_LIBWACOM_GET_PAIRED_DEVICE', result)?
Or even .set('HAVE_LIBWACOM_GET_PAIRED_DEVICE', result) if you use
#ifdef and not #if.
> + endif
> +endif
> +
> +############ udev bits ############
> +
> +udev_dir = get_option('udev-dir')
> +if udev_dir == ''
> + udev_dir = '@0@/lib/udev'.format(get_option('prefix'))
Here you should use:
join_paths(get_option('prefix'), get_option('libdir'), udev)
That’ll do exactly what you mean (join_paths() will drop the prefix if
libdir is absolute).
As a side note, maybe could you simply defaults to:
dependency('udev').get_pkgconfig_variable('udevdir')
> +endif
> +udev_rules_dir = '@0@/rules.d'.format(udev_dir)
> +udev_hwdb_dir = '@0@/hwdb.d'.format(udev_dir)
join_paths() is not a bad choice for these either, but not a big deal.
> +executable('libinput-device-group',
> + 'udev/libinput-device-group.c',
> + dependencies : [dep_udev, dep_libwacom],
> + include_directories : include_directories('src'),
> + install : true,
> + install_dir : udev_dir)
> +executable('libinput-model-quirks',
> + 'udev/libinput-model-quirks.c',
> + dependencies : dep_udev,
> + include_directories : include_directories('src'),
> + install : true,
> + install_dir : udev_dir)
> +
> +model_quirks = 'udev/90-libinput-model-quirks.hwdb'
> +install_data(model_quirks,
> + install_dir : udev_hwdb_dir)
> +
> +parse_hwdb_py = find_program('udev/parse_hwdb.py')
> +test('parse-hwdb',
> + parse_hwdb_py,
> + args : ['@0@/@1@'.format(meson.source_root(), model_quirks)])
I think you can make model_quirks a files() and use .full_path() on it
(didn’t test).
> +udev_rules_config = configuration_data()
> +udev_rules_config.set('UDEV_TEST_PATH', '')
> +configure_file(input : 'udev/80-libinput-device-groups.rules.in',
> + output : '80-libinput-device-groups.rules',
> + install : true,
> + install_dir : udev_rules_dir,
> + configuration : udev_rules_config)
> +configure_file(input : 'udev/90-libinput-model-quirks.rules.in',
> + output : '90-libinput-model-quirks.rules',
> + install : true,
> + install_dir : udev_rules_dir,
> + configuration : udev_rules_config)
> +
> +litest_udev_rules_config = configuration_data()
> +litest_udev_rules_config.set('UDEV_TEST_PATH', meson.build_root())
> +litest_groups_rules_file = configure_file(input : 'udev/80-libinput-device-groups.rules.in',
> + output : '80-libinput-device-groups-litest.rules',
> + install : false,
> + configuration : litest_udev_rules_config)
> +litest_model_quirks_file = configure_file(input : 'udev/90-libinput-model-quirks.rules.in',
> + output : '90-libinput-model-quirks-litest.rules',
> + install : false,
> + configuration : litest_udev_rules_config)
> +
> +############ libinput-util.a ############
> +src_libinput_util = [
> + 'src/libinput-util.c',
> + 'src/libinput-util.h'
> +]
> +libinput_util = static_library('libinput-util',
> + src_libinput_util,
> + dependencies : dep_udev)
> +dep_libinput_util = declare_dependency(link_with: libinput_util)
> +
> +############ libfilter.a ############
> +src_libfilter = [
> + 'src/filter.c',
> + 'src/filter.h',
> + 'src/filter-private.h'
> +]
> +libfilter = static_library('filter', src_libfilter)
> +dep_libfilter = declare_dependency(link_with: libfilter)
> +
> +############ libinput.so ############
> +install_headers('src/libinput.h')
> +src_libinput = [
> + 'src/libinput.c',
> + 'src/libinput.h',
> + 'src/libinput-private.h',
> + 'src/evdev.c',
> + 'src/evdev.h',
> + 'src/evdev-lid.c',
> + 'src/evdev-middle-button.c',
> + 'src/evdev-mt-touchpad.c',
> + 'src/evdev-mt-touchpad.h',
> + 'src/evdev-mt-touchpad-tap.c',
> + 'src/evdev-mt-touchpad-buttons.c',
> + 'src/evdev-mt-touchpad-edge-scroll.c',
> + 'src/evdev-mt-touchpad-gestures.c',
> + 'src/evdev-tablet.c',
> + 'src/evdev-tablet.h',
> + 'src/evdev-tablet-pad.c',
> + 'src/evdev-tablet-pad.h',
> + 'src/evdev-tablet-pad-leds.c',
> + 'src/filter.c',
> + 'src/filter.h',
> + 'src/filter-private.h',
> + 'src/path-seat.h',
> + 'src/path-seat.c',
> + 'src/udev-seat.c',
> + 'src/udev-seat.h',
> + 'src/timer.c',
> + 'src/timer.h',
> + 'include/linux/input.h'
> +]
> +deps_libinput = [
> + dep_mtdev,
> + dep_udev,
> + dep_libevdev,
> + dep_lm,
> + dep_rt,
> + dep_libwacom,
> + dep_libinput_util
> +]
> +
> +libinput_version_h_config = configuration_data()
> +libinput_version_h_config.set('LIBINPUT_VERSION_MAJOR', libinput_version[0])
> +libinput_version_h_config.set('LIBINPUT_VERSION_MINOR', libinput_version[1])
> +libinput_version_h_config.set('LIBINPUT_VERSION_MICRO', libinput_version[2])
> +libinput_version_h_config.set('LIBINPUT_VERSION', meson.project_version())
> +
> +libinput_version_h = configure_file(
> + input : 'src/libinput-version.h.in',
> + output : 'libinput-version.h',
> + configuration : libinput_version_h_config,
> + install: false,
> +)
> +
> +mapfile = 'src/libinput.sym'
> +version_flag = '-Wl,--version-script, at 0@/@1@'.format(meson.current_source_dir(), mapfile)
Nit: join_paths() (you probably copied the exact line from Meson doc,
sorry ;-) )
Btw, with a version script, is it still useful to have the so_version?
Isn’t it to solve the same issue but nicer (by providing everything in a
single .so whatever the version is)?
> +lib_libinput = shared_library('input',
> + src_libinput,
> + include_directories : include_directories('.'),
> + dependencies : deps_libinput,
> + version : libinput_so_version,
> + link_args : version_flag,
> + link_depends : mapfile,
> + install : true
> + )
> +
> +dep_libinput = declare_dependency(
> + link_with : lib_libinput,
> + dependencies : deps_libinput)
> +
> +pkgconfig.generate(
> + filebase: 'libinput',
> + name: 'Libinput',
> + description: 'Input device library',
> + version: meson.project_version(),
> + libraries: lib_libinput
> +)
> +
> +############ documentation ############
> +
> +doxygen = find_program('doxygen',
> + required : false)
> +if doxygen.found()
> + doxygen_version_cmd = run_command(doxygen.path(), '--version')
> + if doxygen_version_cmd.returncode() != 0
> + error('Command "doxygen --version" failed.')
> + endif
> + doxygen_version = doxygen_version_cmd.stdout()
> + if doxygen_version.version_compare('< 1.8.3')
> + error('doxygen needs to be at least version 1.8.3 (have @0@)'.format(doxygen_version))
> + endif
> + dot = find_program('dot')
> + grep = find_program('grep')
> + dot_version_cmd = run_command(dot.path(), '-V')
> + if dot_version_cmd.returncode() != 0
> + error('Command "dot -V" failed.')
> + endif
> + # dot -V output is (to stderr):
> + # dot - graphviz version 2.38.0 (20140413.2041)
> + dot_version = dot_version_cmd.stderr().split(' ')[4]
> + if dot_version.version_compare('< 2.26')
> + error('Graphviz dot needs to be at least version 2.26 (have @0@)'.format(dot_version))
> + endif
> +
> + src_doxygen = [
> + # source files
> + meson.source_root() + '/src/libinput.h',
> + # written docs
> + meson.source_root() + '/doc/absolute-axes.dox',
> + meson.source_root() + '/doc/absolute-coordinate-ranges.dox',
> + meson.source_root() + '/doc/building.dox',
> + meson.source_root() + '/doc/clickpad-softbuttons.dox',
> + meson.source_root() + '/doc/contributing.dox',
> + meson.source_root() + '/doc/device-configuration-via-udev.dox',
> + meson.source_root() + '/doc/faqs.dox',
> + meson.source_root() + '/doc/gestures.dox',
> + meson.source_root() + '/doc/middle-button-emulation.dox',
> + meson.source_root() + '/doc/normalization-of-relative-motion.dox',
> + meson.source_root() + '/doc/palm-detection.dox',
> + meson.source_root() + '/doc/page-hierarchy.dox',
> + meson.source_root() + '/doc/pointer-acceleration.dox',
> + meson.source_root() + '/doc/reporting-bugs.dox',
> + meson.source_root() + '/doc/scrolling.dox',
> + meson.source_root() + '/doc/seats.dox',
> + meson.source_root() + '/doc/switches.dox',
> + meson.source_root() + '/doc/t440-support.dox',
> + meson.source_root() + '/doc/tablet-support.dox',
> + meson.source_root() + '/doc/tapping.dox',
> + meson.source_root() + '/doc/test-suite.dox',
> + meson.source_root() + '/doc/tools.dox',
> + meson.source_root() + '/doc/touchpad-jumping-cursors.dox',
> + meson.source_root() + '/doc/touchpads.dox',
> + meson.source_root() + '/doc/what-is-libinput.dox',
> + # dot drawings
> + meson.source_root() + '/doc/dot/seats-sketch.gv',
> + meson.source_root() + '/doc/dot/seats-sketch-libinput.gv',
> + meson.source_root() + '/doc/dot/libinput-stack-wayland.gv',
> + meson.source_root() + '/doc/dot/libinput-stack-xorg.gv',
> + meson.source_root() + '/doc/dot/libinput-stack-gnome.gv',
> + meson.source_root() + '/doc/dot/evemu.gv',
> + # svgs
> + meson.source_root() + '/doc/svg/button-scrolling.svg',
> + meson.source_root() + '/doc/svg/clickfinger.svg',
> + meson.source_root() + '/doc/svg/clickfinger-distance.svg',
> + meson.source_root() + '/doc/svg/edge-scrolling.svg',
> + meson.source_root() + '/doc/svg/gesture-2fg-ambiguity.svg',
> + meson.source_root() + '/doc/svg/palm-detection.svg',
> + meson.source_root() + '/doc/svg/pinch-gestures.svg',
> + meson.source_root() + '/doc/svg/pinch-gestures-softbuttons.svg',
> + meson.source_root() + '/doc/svg/ptraccel-linear.svg',
> + meson.source_root() + '/doc/svg/ptraccel-low-dpi.svg',
> + meson.source_root() + '/doc/svg/ptraccel-touchpad.svg',
> + meson.source_root() + '/doc/svg/ptraccel-trackpoint.svg',
> + meson.source_root() + '/doc/svg/software-buttons.svg',
> + meson.source_root() + '/doc/svg/swipe-gestures.svg',
> + meson.source_root() + '/doc/svg/tablet-axes.svg',
> + meson.source_root() + '/doc/svg/tablet-cintiq24hd-modes.svg',
> + meson.source_root() + '/doc/svg/tablet-interfaces.svg',
> + meson.source_root() + '/doc/svg/tablet-intuos-modes.svg',
> + meson.source_root() + '/doc/svg/tablet-left-handed.svg',
> + meson.source_root() + '/doc/svg/tablet-out-of-bounds.svg',
> + meson.source_root() + '/doc/svg/tablet.svg',
> + meson.source_root() + '/doc/svg/tap-n-drag.svg',
> + meson.source_root() + '/doc/svg/thumb-detection.svg',
> + meson.source_root() + '/doc/svg/top-software-buttons.svg',
> + meson.source_root() + '/doc/svg/touchscreen-gestures.svg',
> + meson.source_root() + '/doc/svg/twofinger-scrolling.svg',
> + # style files
> + meson.source_root() + '/doc/style/header.html',
> + meson.source_root() + '/doc/style/footer.html',
> + meson.source_root() + '/doc/style/customdoxygen.css',
> + meson.source_root() + '/doc/style/bootstrap.css',
> + meson.source_root() + '/doc/style/libinputdoxygen.css',
> + meson.source_root() + '/README.md'
> + ]
> +
> + doc_config = configuration_data()
> + doc_config.set('PACKAGE_NAME', meson.project_name())
> + doc_config.set('PACKAGE_VERSION', meson.project_version())
> + doc_config.set('top_srcdir', meson.source_root())
> + doc_config.set('INPUT', ' '.join(src_doxygen))
> +
> + doxyfile = configure_file(input : 'doc/libinput.doxygen.in',
> + output : 'libinput.doxygen',
> + configuration : doc_config,
> + install : false)
> + custom_target('doxygen',
> + input : doxyfile,
> + output : [ 'html' ],
> + command : [ doxygen, doxyfile ],
> + install : false,
> + build_by_default : true)
> +
> +endif
> +
> +############ tools ############
> +tools_shared_sources = [ 'tools/shared.c',
> + 'tools/shared.h' ]
> +event_debug_sources = [ 'tools/event-debug.c' ] + tools_shared_sources
> +executable('event-debug',
> + event_debug_sources,
> + dependencies : dep_libinput,
> + include_directories : include_directories('src'),
> + install : false
> + )
> +
> +libinput_debug_events_sources = event_debug_sources
> +executable('libinput-debug-events',
> + libinput_debug_events_sources,
> + dependencies : dep_libinput,
> + include_directories : include_directories('src'),
> + install : true
> + )
> +
> +libinput_list_devices_sources = [ 'tools/libinput-list-devices.c' ] + tools_shared_sources
> +executable('libinput-list-devices',
> + libinput_list_devices_sources,
> + dependencies : [ dep_libinput ],
> + include_directories : include_directories('src'),
> + install : true
> + )
> +
> +ptraccel_debug_sources = [ 'tools/ptraccel-debug.c' ]
> +executable('ptraccel-debug',
> + ptraccel_debug_sources,
> + dependencies : [ dep_libfilter, dep_libinput ],
> + include_directories : include_directories('src'),
> + install : false
> + )
> +
> +if get_option('event-gui')
> + dep_gtk = dependency('gtk+-3.0')
> + dep_cairo = dependency('cairo')
> + dep_glib = dependency('glib-2.0')
> +
> + event_gui_sources = [ 'tools/event-gui.c' ] + tools_shared_sources
> + deps_event_gui = [
> + dep_gtk,
> + dep_cairo,
> + dep_glib,
> + dep_libevdev,
> + dep_libinput
> + ]
> + executable('event-gui',
> + event_gui_sources,
> + dependencies : deps_event_gui,
> + include_directories : include_directories('src'),
> + install : false
> + )
> +endif
> +
> +install_man('tools/libinput-list-devices.1',
> + 'tools/libinput-debug-events.1')
> +
> +
> +############ tests ############
> +
> +if get_option('enable-tests')
> + dep_check = dependency('check', version : '>= 0.9.10')
> + valgrind = find_program('valgrind')
> + addr2line = find_program('addr2line')
> +
> + if addr2line.found()
> + config_h.set('HAVE_ADDR2LINE', '1')
> + config_h.set('ADDR2LINE', '"@0@"'.format(addr2line.path()))
> + endif
> +
> + dep_libunwind = dependency('libunwind', required: false)
> + if dep_libunwind.found()
> + config_h.set('HAVE_LIBUNWIND', '1')
Nit: .set01()
> + endif
> +
> + lib_litest_sources = [
> + 'test/litest.h',
> + 'test/litest-int.h',
> + 'test/litest-device-acer-hawaii-keyboard.c',
> + 'test/litest-device-acer-hawaii-touchpad.c',
> + 'test/litest-device-alps-semi-mt.c',
> + 'test/litest-device-alps-dualpoint.c',
> + 'test/litest-device-anker-mouse-kbd.c',
> + 'test/litest-device-apple-appletouch.c',
> + 'test/litest-device-apple-internal-keyboard.c',
> + 'test/litest-device-apple-magicmouse.c',
> + 'test/litest-device-asus-rog-gladius.c',
> + 'test/litest-device-atmel-hover.c',
> + 'test/litest-device-bcm5974.c',
> + 'test/litest-device-calibrated-touchscreen.c',
> + 'test/litest-device-cyborg-rat-5.c',
> + 'test/litest-device-elantech-touchpad.c',
> + 'test/litest-device-generic-singletouch.c',
> + 'test/litest-device-huion-pentablet.c',
> + 'test/litest-device-keyboard.c',
> + 'test/litest-device-keyboard-all-codes.c',
> + 'test/litest-device-keyboard-razer-blackwidow.c',
> + 'test/litest-device-lid-switch.c',
> + 'test/litest-device-lid-switch-surface3.c',
> + 'test/litest-device-logitech-trackball.c',
> + 'test/litest-device-nexus4-touch-screen.c',
> + 'test/litest-device-magic-trackpad.c',
> + 'test/litest-device-mouse.c',
> + 'test/litest-device-mouse-wheel-tilt.c',
> + 'test/litest-device-mouse-roccat.c',
> + 'test/litest-device-mouse-low-dpi.c',
> + 'test/litest-device-mouse-wheel-click-angle.c',
> + 'test/litest-device-mouse-wheel-click-count.c',
> + 'test/litest-device-ms-surface-cover.c',
> + 'test/litest-device-protocol-a-touch-screen.c',
> + 'test/litest-device-qemu-usb-tablet.c',
> + 'test/litest-device-synaptics.c',
> + 'test/litest-device-synaptics-hover.c',
> + 'test/litest-device-synaptics-i2c.c',
> + 'test/litest-device-synaptics-rmi4.c',
> + 'test/litest-device-synaptics-st.c',
> + 'test/litest-device-synaptics-t440.c',
> + 'test/litest-device-synaptics-x1-carbon-3rd.c',
> + 'test/litest-device-trackpoint.c',
> + 'test/litest-device-touch-screen.c',
> + 'test/litest-device-touchscreen-fuzz.c',
> + 'test/litest-device-wacom-bamboo-16fg-pen.c',
> + 'test/litest-device-wacom-cintiq-12wx-pen.c',
> + 'test/litest-device-wacom-cintiq-13hdt-finger.c',
> + 'test/litest-device-wacom-cintiq-13hdt-pad.c',
> + 'test/litest-device-wacom-cintiq-13hdt-pen.c',
> + 'test/litest-device-wacom-cintiq-24hd-pen.c',
> + 'test/litest-device-wacom-cintiq-24hdt-pad.c',
> + 'test/litest-device-wacom-ekr.c',
> + 'test/litest-device-wacom-hid4800-pen.c',
> + 'test/litest-device-wacom-intuos3-pad.c',
> + 'test/litest-device-wacom-intuos5-finger.c',
> + 'test/litest-device-wacom-intuos5-pad.c',
> + 'test/litest-device-wacom-intuos5-pen.c',
> + 'test/litest-device-wacom-isdv4-e6-pen.c',
> + 'test/litest-device-wacom-isdv4-e6-finger.c',
> + 'test/litest-device-waltop-tablet.c',
> + 'test/litest-device-wheel-only.c',
> + 'test/litest-device-xen-virtual-pointer.c',
> + 'test/litest-device-vmware-virtual-usb-mouse.c',
> + 'test/litest-device-yubikey.c',
> + 'test/litest.c'
> + ]
> +
> + dep_dl = cc.find_library('dl')
> + deps_litest = [
> + dep_libinput,
> + dep_check,
> + dep_libunwind,
> + dep_udev,
> + dep_libevdev,
> + dep_dl,
> + dep_lm
> + ]
> + def_quirks_rules_file = '-DLIBINPUT_MODEL_QUIRKS_UDEV_RULES_FILE="@0@"'.format(litest_model_quirks_file)
> + def_quirks_hwdb_file = '-DLIBINPUT_MODEL_QUIRKS_UDEV_HWDB_FILE="@0@/udev/90-libinput-model-quirks.hwdb"'.format(meson.source_root())
> + def_test_rules_file = '-DLIBINPUT_TEST_DEVICE_RULES_FILE="@0@/udev/80-libinput-test-device.rules"'.format(meson.source_root())
> + defs_litest = [def_quirks_rules_file,
> + def_quirks_hwdb_file,
> + def_test_rules_file]
> +
> + lib_litest = static_library('litest',
> + lib_litest_sources,
> + include_directories : include_directories('src'),
> + dependencies : deps_litest,
> + c_args : defs_litest)
> + dep_litest = declare_dependency(link_with : lib_litest,
> + dependencies : deps_litest)
> +
> + def_no_main = '-DLITEST_NO_MAIN'
> + def_disable_backtrace = '-DLITEST_DISABLE_BACKTRACE_LOGGING'
> + defs_litest_selftest = [
> + def_no_main,
> + def_disable_backtrace
> + ] + defs_litest
> + test_litest_selftest_sources = [
> + 'test/litest-selftest.c',
> + 'test/litest.c',
> + 'test/litest-int.h',
> + 'test/litest.h'
> + ]
> + deps_litest_selftest = [dep_litest]
> + test_litest_selftest = executable('test-litest-selftest',
> + test_litest_selftest_sources,
> + include_directories : include_directories('src'),
> + dependencies : deps_litest_selftest,
> + c_args : defs_litest_selftest,
> + install : false)
> + test('test-litest-selftest', test_litest_selftest)
> +
> + test_symbols_leak = find_program('test/symbols-leak-test.in')
> + test('symbols-leak-test',
> + test_symbols_leak,
> + args : [ meson.current_source_dir() ])
> +
> + libinput_test_runner_sources = [
> + 'test/test-udev.c',
> + 'test/test-path.c',
> + 'test/test-pointer.c',
> + 'test/test-touch.c',
> + 'test/test-log.c',
> + 'test/test-tablet.c',
> + 'test/test-pad.c',
> + 'test/test-touchpad.c',
> + 'test/test-touchpad-tap.c',
> + 'test/test-touchpad-buttons.c',
> + 'test/test-trackpoint.c',
> + 'test/test-trackball.c',
> + 'test/test-misc.c',
> + 'test/test-keyboard.c',
> + 'test/test-device.c',
> + 'test/test-gestures.c',
> + 'test/test-lid.c'
> + ]
> + def_LT_VERSION = '-DLIBINPUT_LT_VERSION="@0@:@1@:@2@"'.format(libinput_lt_c, libinput_lt_r, libinput_lt_a)
> + libinput_test_runner = executable('libinput-test-suite-runner',
> + libinput_test_runner_sources,
> + include_directories : include_directories('src'),
> + dependencies : dep_litest,
> + c_args : [ def_LT_VERSION ],
> + install : false)
> + test('libinput-test-suite-runner',
> + libinput_test_runner,
> + timeout : 3600,
> + env : [ 'LITEST_VERBOSE=1' ])
> +
> + # build-test only
> + executable('test-build-pedantic',
> + 'test/build-pedantic.c',
> + include_directories : include_directories('src'),
> + c_args : ['-std=c99', '-pedantic', '-Werror'],
> + install : false)
> + # build-test only
> + executable('test-build-std-gnuc90',
> + 'test/build-pedantic.c',
> + include_directories : include_directories('src'),
> + c_args : ['-std=gnu90', '-Werror'],
> + install : false)
> + # test for linking with the minimal linker flags
> + executable('test-build-linker',
> + 'test/build-pedantic.c',
> + include_directories : include_directories('src'),
> + dependencies : [ dep_libinput, dep_libinput_util ],
> + install : false)
> + # test including from C++
> + executable('test-build-cxx',
> + 'test/build-cxx.cc',
> + include_directories : include_directories('src'),
> + install : false)
> +
> +endif
> +############ output files ############
> +configure_file(output: 'config.h', install: false, configuration: config_h)
> diff --git a/meson_options.txt b/meson_options.txt
> new file mode 100644
> index 0000000..93a7440
> --- /dev/null
> +++ b/meson_options.txt
> @@ -0,0 +1,16 @@
> +option('udev-dir',
> + type: 'string',
> + default: '',
> + description: 'udev base directory [default=$prefix/lib/udev]')
$libdir, as noted above.
> +option('libwacom',
> + type: 'boolean',
> + default: true,
> + description: 'Use libwacom for tablet identification (default=enabled)')
> +option('event-gui',
> + type: 'boolean',
> + default: true,
> + description: 'Build the GUI event viewer [default=enabled]')
> +option('enable-tests',
> + type: 'boolean',
> + default: true,
> + description: 'Build the tests [default=yes]')
Maybe make them all "true" instead of enabled/yes?
I probably mised some but that’s a start. :-)
Cheers,
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list