aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-03-03 11:37:02 +0100
committerDominique Martinet <asmadeus@codewreck.org>2018-03-03 11:46:04 +0100
commitf8428d1063c6420ee43424269149a65f8c33812f (patch)
tree7e8bae9255abd5629b02b0b077237e1f4d0873e0 /meson.build
parent2a9ba5c8dc21bfd167fc13c46b4d853cb0c70bce (diff)
xcb errors: optional dependency with improved messages
Now message can look like: [xwayland/xwm.c:991] xcb error: op ChangeProperty (no minor), code Window (no extension), value 6291465 instead of this one when the lib is not available: [xwayland/xwm.c:999] xcb error: op 18:0, code 3, sequence 103, value 6291465 The value in case of Window is the window id, so we can tell what function applied on which window which is a good start. The sequence ought to be able to tell us more precisely which invocation it was, but we never log it when calling functions so is useless in practice and no longer logged.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build15
1 files changed, 11 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index d5ae7863..1188f318 100644
--- a/meson.build
+++ b/meson.build
@@ -64,6 +64,7 @@ xcb_xfixes = dependency('xcb-xfixes')
xcb_image = dependency('xcb-image')
xcb_render = dependency('xcb-render')
xcb_icccm = dependency('xcb-icccm', required: false)
+xcb_errors = dependency('xcb-errors', required: get_option('enable_xcb_errors') == 'true')
x11_xcb = dependency('x11-xcb')
libcap = dependency('libcap', required: get_option('enable_libcap') == 'true')
systemd = dependency('libsystemd', required: get_option('enable_systemd') == 'true')
@@ -78,6 +79,10 @@ if xcb_icccm.found()
conf_data.set('WLR_HAS_XCB_ICCCM', true)
endif
+if xcb_errors.found() and get_option('enable_xcb_errors') != 'false'
+ conf_data.set('WLR_HAS_XCB_ERRORS', true)
+endif
+
if libcap.found() and get_option('enable_libcap') != 'false'
conf_data.set('WLR_HAS_LIBCAP', true)
wlr_deps += libcap
@@ -164,10 +169,12 @@ summary = [
'----------------',
'wlroots @0@'.format(meson.project_version()),
'',
- ' libcap: @0@'.format(conf_data.get('WLR_HAS_LIBCAP', false)),
- ' systemd: @0@'.format(conf_data.get('WLR_HAS_SYSTEMD', false)),
- ' elogind: @0@'.format(conf_data.get('WLR_HAS_ELOGIND', false)),
- ' xwayland: @0@'.format(conf_data.get('WLR_HAS_XWAYLAND', false)),
+ ' libcap: @0@'.format(conf_data.get('WLR_HAS_LIBCAP', false)),
+ ' systemd: @0@'.format(conf_data.get('WLR_HAS_SYSTEMD', false)),
+ ' elogind: @0@'.format(conf_data.get('WLR_HAS_ELOGIND', false)),
+ ' xwayland: @0@'.format(conf_data.get('WLR_HAS_XWAYLAND', false)),
+ ' xcb-icccm: @0@'.format(conf_data.get('WLR_HAS_XCB_ICCCM', false)),
+ ' xcb-errors: @0@'.format(conf_data.get('WLR_HAS_XCB_ERRORS', false)),
'----------------',
''
]