2018-08-24 07:35:02 +00:00
|
|
|
xwayland_libs = []
|
|
|
|
xwayland_required = [
|
|
|
|
'xcb',
|
|
|
|
'xcb-composite',
|
|
|
|
'xcb-render',
|
|
|
|
'xcb-xfixes',
|
|
|
|
]
|
2019-11-22 07:11:15 +00:00
|
|
|
xwayland_optional = {
|
|
|
|
'xcb-errors': 'Required for printing X11 errors.',
|
|
|
|
'xcb-icccm': 'Required for extended X11 window manager hints.',
|
|
|
|
}
|
|
|
|
|
|
|
|
msg = []
|
|
|
|
if get_option('xwayland').enabled()
|
|
|
|
msg += 'Install "@0@" or pass "-Dxwayland=disabled".'
|
|
|
|
endif
|
|
|
|
if not get_option('xwayland').disabled()
|
|
|
|
msg += 'Required for Xwayland support.'
|
|
|
|
endif
|
2018-08-24 07:35:02 +00:00
|
|
|
|
|
|
|
foreach lib : xwayland_required
|
2019-11-22 07:11:15 +00:00
|
|
|
dep = dependency(lib,
|
|
|
|
required: get_option('xwayland'),
|
|
|
|
not_found_message: '\n'.join(msg).format(lib),
|
|
|
|
)
|
2018-08-24 07:35:02 +00:00
|
|
|
if not dep.found()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
xwayland_libs += dep
|
|
|
|
endforeach
|
|
|
|
|
2019-11-22 07:11:15 +00:00
|
|
|
foreach lib, desc : xwayland_optional
|
|
|
|
msg = []
|
|
|
|
if get_option(lib).enabled()
|
|
|
|
msg += 'Install "@0@" or pass "-D@0@=disabled".'
|
|
|
|
endif
|
|
|
|
if not get_option(lib).disabled()
|
|
|
|
msg += desc
|
|
|
|
endif
|
|
|
|
|
|
|
|
dep = dependency(lib,
|
|
|
|
required: get_option(lib),
|
|
|
|
not_found_message: '\n'.join(msg).format(lib),
|
|
|
|
)
|
2018-08-24 07:35:02 +00:00
|
|
|
if dep.found()
|
|
|
|
xwayland_libs += dep
|
2018-11-12 09:12:46 +00:00
|
|
|
conf_data.set10('WLR_HAS_' + lib.underscorify().to_upper(), true)
|
2018-08-24 07:35:02 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2019-11-22 07:11:15 +00:00
|
|
|
wlr_files += files(
|
|
|
|
'selection/dnd.c',
|
|
|
|
'selection/incoming.c',
|
|
|
|
'selection/outgoing.c',
|
|
|
|
'selection/selection.c',
|
|
|
|
'sockets.c',
|
|
|
|
'xwayland.c',
|
|
|
|
'xwm.c',
|
2017-08-30 18:30:47 +00:00
|
|
|
)
|
2019-11-22 07:11:15 +00:00
|
|
|
wlr_deps += xwayland_libs
|
2018-11-12 09:12:46 +00:00
|
|
|
conf_data.set10('WLR_HAS_XWAYLAND', true)
|