aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-08-08 17:32:45 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-08-08 17:32:45 +0000
commit34520aa16e3b1f284168f614a0bd0ba92f5eccc6 (patch)
treefc6c566f06b64504671d8c2edcc79a6841595eb6
parentMerge branch 'wayland-protocols-1.32' (diff)
meson: allow building with wayland-protocols as a subproject
-rw-r--r--CHANGELOG.md4
-rw-r--r--meson.build26
-rw-r--r--subprojects/wayland-protocols.wrap3
3 files changed, 21 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b8ae645..1c4682b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,10 @@
## Unreleased
### Added
+
+* Support for building with _wayland-protocols_ as a subproject.
+
+
### Changed
* Minimum required version of _wayland-protocols_ is now 1.32
diff --git a/meson.build b/meson.build
index 729d8f03..8f32225e 100644
--- a/meson.build
+++ b/meson.build
@@ -123,7 +123,9 @@ math = cc.find_library('m')
threads = [dependency('threads'), cc.find_library('stdthreads', required: false)]
libepoll = dependency('epoll-shim', required: false)
pixman = dependency('pixman-1')
-wayland_protocols = dependency('wayland-protocols', version: '>=1.32')
+wayland_protocols = dependency('wayland-protocols', version: '>=1.32',
+ fallback: 'wayland-protocols',
+ default_options: ['tests=false'])
wayland_client = dependency('wayland-client')
wayland_cursor = dependency('wayland-cursor')
xkb = dependency('xkbcommon', version: '>=1.0.0')
@@ -146,17 +148,17 @@ wscanner_prog = find_program(
wl_proto_headers = []
wl_proto_src = []
wl_proto_xml = [
- wayland_protocols_datadir + '/stable/xdg-shell/xdg-shell.xml',
- wayland_protocols_datadir + '/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml',
- wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml',
- wayland_protocols_datadir + '/unstable/primary-selection/primary-selection-unstable-v1.xml',
- wayland_protocols_datadir + '/stable/presentation-time/presentation-time.xml',
- wayland_protocols_datadir + '/unstable/text-input/text-input-unstable-v3.xml',
- wayland_protocols_datadir + '/staging/xdg-activation/xdg-activation-v1.xml',
- wayland_protocols_datadir + '/stable/viewporter/viewporter.xml',
- wayland_protocols_datadir + '/staging/fractional-scale/fractional-scale-v1.xml',
- wayland_protocols_datadir + '/unstable/tablet/tablet-unstable-v2.xml', # required by cursor-shape-v1
- wayland_protocols_datadir + '/staging/cursor-shape/cursor-shape-v1.xml',
+ wayland_protocols_datadir / 'stable/xdg-shell/xdg-shell.xml',
+ wayland_protocols_datadir / 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml',
+ wayland_protocols_datadir / 'unstable/xdg-output/xdg-output-unstable-v1.xml',
+ wayland_protocols_datadir / 'unstable/primary-selection/primary-selection-unstable-v1.xml',
+ wayland_protocols_datadir / 'stable/presentation-time/presentation-time.xml',
+ wayland_protocols_datadir / 'unstable/text-input/text-input-unstable-v3.xml',
+ wayland_protocols_datadir / 'staging/xdg-activation/xdg-activation-v1.xml',
+ wayland_protocols_datadir / 'stable/viewporter/viewporter.xml',
+ wayland_protocols_datadir / 'staging/fractional-scale/fractional-scale-v1.xml',
+ wayland_protocols_datadir / 'unstable/tablet/tablet-unstable-v2.xml', # required by cursor-shape-v1
+ wayland_protocols_datadir / 'staging/cursor-shape/cursor-shape-v1.xml',
]
foreach prot : wl_proto_xml
diff --git a/subprojects/wayland-protocols.wrap b/subprojects/wayland-protocols.wrap
new file mode 100644
index 00000000..74e5e913
--- /dev/null
+++ b/subprojects/wayland-protocols.wrap
@@ -0,0 +1,3 @@
+[wrap-git]
+url = https://gitlab.freedesktop.org/wayland/wayland-protocols.git
+revision = main