Skip to content

Commit

Permalink
build: drop xwayland option
Browse files Browse the repository at this point in the history
This is unnecessary because Xwayland logic doesn't bring in new
dependencies. We can just compile in our Xwayland-related code
when wlroots has been built with Xwayland support.

See this Sway patch: swaywm/sway#8165
  • Loading branch information
emersion committed Jul 8, 2024
1 parent e7d8780 commit fc157ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ $ ninja -C build
By default, this builds a debug build. To build a release build, use `meson
build --buildtype=release`.

Cage comes with compile-time support for XWayland. To enable this,
first make sure that your version of wlroots is compiled with this
option. Then, add `-Dxwayland=true` to the `meson` command above. Note
that you'll need to have the XWayland binary installed on your system
for this to work.
Cage comes with compile-time support for XWayland. To enable this, make sure
that your version of wlroots is compiled with this option. Note that you'll
need to have the XWayland binary installed on your system for this to work.

You can run Cage by running `./build/cage APPLICATION`. If you run it from
within an existing X11 or Wayland session, it will open in a virtual output as
Expand Down
10 changes: 1 addition & 9 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,7 @@ server_protos = declare_dependency(
sources: server_protos_headers,
)

if not get_option('xwayland').disabled()
wlroots_has_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true'
if get_option('xwayland').enabled() and not wlroots_has_xwayland
error('Cannot build Cage with XWayland support: wlroots has been built without it')
endif
have_xwayland = true
else
have_xwayland = false
endif
have_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true'

version = '@0@'.format(meson.project_version())
git = find_program('git', native: true, required: false)
Expand Down
1 change: 0 additions & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')

0 comments on commit fc157ab

Please sign in to comment.