Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Rauch <Rauch.Christian@gmx.de>2021-06-23 23:43:04 +0300
committerChristian Rauch <Rauch.Christian@gmx.de>2021-07-06 20:17:27 +0300
commit933eddc9a113b40849895922f2dc350305809ebd (patch)
treec477302d91d36771e4fe105dd4261876c6d71f07
parentc26b46ddcaae70d2a712ede474bd84135cc65b56 (diff)
cmake: use harvested 'wayland-protocols' if system version is insufficient
-rw-r--r--intern/ghost/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index e98faf522e6..6edd7b386da 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -297,7 +297,20 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
)
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
- pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
+
+ pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
+ if (${wayland-protocols_FOUND})
+ pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
+ else()
+ find_path(WAYLAND_PROTOCOLS_DIR
+ NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
+ PATH_SUFFIXES share/wayland-protocols
+ )
+ endif()
+
+ if (NOT EXISTS ${WAYLAND_PROTOCOLS_DIR})
+ message(FATAL_ERROR "path to wayland-protocols not found")
+ endif()
# Generate protocols bindings.
macro(generate_protocol_bindings NAME PROT_DEF)