diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0991ad4..78cf1b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: matrix: CC: [ gcc, clang ] OS: [ "alpine:edge", "archlinux:base-devel" ] - xwayland: [ true, false ] + xwayland: [ enabled, disabled ] container: ${{ matrix.OS }} env: CC: ${{ matrix.CC }} @@ -54,7 +54,7 @@ jobs: run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b 0.16.0 - name: Check for formatting changes run: | - meson build-clang-format -Dxwayland=true + meson build-clang-format -Dxwayland=enabled ninja -C build-clang-format clang-format-check scan-build: @@ -73,5 +73,5 @@ jobs: run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b 0.16.0 - name: Run scan-build run: | - meson build-scan-build -Dxwayland=true + meson build-scan-build -Dxwayland=enabled ninja -C build-scan-build scan-build diff --git a/meson.build b/meson.build index fd84262..d38b4d1 100644 --- a/meson.build +++ b/meson.build @@ -64,9 +64,9 @@ server_protos = declare_dependency( sources: server_protos_headers, ) -if get_option('xwayland') +if not get_option('xwayland').disabled() wlroots_has_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true' - if not wlroots_has_xwayland + 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 diff --git a/meson_options.txt b/meson_options.txt index 22055dc..d64f510 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,2 @@ option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages') -option('xwayland', type: 'boolean', value: false, description: 'Enable support for X11 applications') +option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')