Skip to content

Commit

Permalink
Merge pull request #52 from wmww/require-wayland-protocols
Browse files Browse the repository at this point in the history
Require system wayland-protocols
  • Loading branch information
wmww authored Oct 26, 2024
2 parents 74dcc4b + 30858e1 commit 3eaeaac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1,156 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The easiest way to build against GTK Layer Shell is to use the `gtk-layer-shell-
* [Meson](https://mesonbuild.com/) (>=0.45.1)
* [Ninja](https://ninja-build.org/) (>=1.8.2)
* [libwayland](https://gitlab.freedesktop.org/wayland/wayland) (>=1.10.0)
* [wayland-protocols](https://gitlab.freedesktop.org/wayland/wayland-protocols) (>=1.16.0)
* [GTK4](https://www.gtk.org/)
* __If `introspection` enabled:__ [GObject introspection](https://gitlab.gnome.org/GNOME/gobject-introspection/)
* __If `docs` enabled:__ [GTK Doc](https://wiki.gnome.org/DocumentationProject/GtkDoc)
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ wayland_server = dependency('wayland-server', version: '>=1.10.0', required: fal
# wayland_scanner is required, but we can find it without pkg-config
wayland_scanner = dependency('wayland-scanner', version: '>=1.10.0', required: false, native: true)

# use system xdg-shell protocol when available
wayland_protocols = dependency('wayland-protocols', version: '>=1.16', required: false)
# required, see https://github.com/wmww/gtk4-layer-shell/issues/24
wayland_protocols = dependency('wayland-protocols', version: '>=1.16', required: true)

pkg_config = import('pkgconfig')
gnome = import('gnome')
Expand Down
14 changes: 4 additions & 10 deletions protocol/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@ else
endif

protocols = [
'wlr-layer-shell-unstable-v1.xml'
]

if wayland_protocols.found()
protocols += join_paths(
'wlr-layer-shell-unstable-v1.xml',
join_paths(
wayland_protocols.get_variable(pkgconfig: 'pkgdatadir'),
'stable/xdg-shell/xdg-shell.xml')
else
# use bundled xdg-shell.xml
protocols += 'xdg-shell.xml'
endif
'stable/xdg-shell/xdg-shell.xml'),
]

gen_client_header = generator(prog_wayland_scanner,
output: ['@[email protected]'],
Expand Down
Loading

0 comments on commit 3eaeaac

Please sign in to comment.