[Bf-blender-cvs] [9d3582f8726] wl_default3: cmake: use harvested 'wayland-protocols' if system version is insufficient
Christian Rauch
noreply at git.blender.org
Sat Jul 3 15:47:43 CEST 2021
Commit: 9d3582f87267fd2303585cfa970db2dc3570b2e1
Author: Christian Rauch
Date: Wed Jun 23 21:43:04 2021 +0100
Branches: wl_default3
https://developer.blender.org/rB9d3582f87267fd2303585cfa970db2dc3570b2e1
cmake: use harvested 'wayland-protocols' if system version is insufficient
===================================================================
M intern/ghost/CMakeLists.txt
===================================================================
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 77ec307e604..09c82139290 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -294,7 +294,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 DEFINED WAYLAND_PROTOCOLS_DIR)
+ message(FATAL_ERROR "path to wayland-protocols not found")
+ endif()
# Generate protocols bindings.
macro(generate_protocol_bindings NAME PROT_DEF)
More information about the Bf-blender-cvs
mailing list