mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-06 01:41:03 -05:00
Add XWayland support
With Cage becoming more popular since its mention on Phoronix and
therefore getting more use-cases than just my own project, add XWayland
support. The refactoring of 2cf40f7 makes this much easier. Note that
this is a no-cost addition for those of us not using XWayland as it is a
compile-time option that needs to be explicitly enabled by adding
`-Dxwayland=true` to your meson command.
This commit is contained in:
parent
48f8f69556
commit
a34c726a1c
10 changed files with 213 additions and 3 deletions
20
meson.build
20
meson.build
|
|
@ -51,6 +51,9 @@ server_protos = declare_dependency(
|
|||
sources: server_protos_headers,
|
||||
)
|
||||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set10('CAGE_HAS_XWAYLAND', get_option('xwayland'))
|
||||
|
||||
cage_sources = [
|
||||
'cage.c',
|
||||
'output.c',
|
||||
|
|
@ -60,6 +63,9 @@ cage_sources = [
|
|||
]
|
||||
|
||||
cage_headers = [
|
||||
configure_file(input: 'config.h.in',
|
||||
output: 'config.h',
|
||||
configuration: conf_data),
|
||||
'output.h',
|
||||
'seat.h',
|
||||
'server.h',
|
||||
|
|
@ -67,6 +73,11 @@ cage_headers = [
|
|||
'xdg_shell.h',
|
||||
]
|
||||
|
||||
if conf_data.get('CAGE_HAS_XWAYLAND', 0) == 1
|
||||
cage_sources += 'xwayland.c'
|
||||
cage_headers += 'xwayland.h'
|
||||
endif
|
||||
|
||||
executable(
|
||||
meson.project_name(),
|
||||
cage_sources + cage_headers,
|
||||
|
|
@ -78,3 +89,12 @@ executable(
|
|||
],
|
||||
install: true,
|
||||
)
|
||||
|
||||
summary = [
|
||||
'',
|
||||
'Cage @0@'.format(meson.project_version()),
|
||||
'',
|
||||
' xwayland: @0@'.format(conf_data.get('CAGE_HAS_XWAYLAND', false)),
|
||||
''
|
||||
]
|
||||
message('\n'.join(summary))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue