blob: d7000b7da1b724bacce7cf0c9ba739c0556e0374 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From ec12bb7bda60cdf2c848e13df67452a7d30a42be Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 3 Sep 2022 18:52:42 -0700
4Subject: [PATCH] cmake: Define WAYLAND_SCANNER and WAYLAND_PROTOCOLS_DIR if
5 not already defined
6
7This helps with cross compiling and providing these knobs from cmake
8cmdline
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 framework/platform/CMakeLists.txt | 8 ++++++--
14 1 file changed, 6 insertions(+), 2 deletions(-)
15
16diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
17index c3ac463e4..030163f6c 100644
18--- a/framework/platform/CMakeLists.txt
19+++ b/framework/platform/CMakeLists.txt
20@@ -73,8 +73,12 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
21 add_definitions(-DDEQP_SUPPORT_WAYLAND=1)
22 include_directories(lnx/wayland)
23
24- pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
25- pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
26+ if (NOT DEFINED WAYLAND_PROTOCOLS_DIR)
27+ pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
28+ endif()
29+ if (NOT DEFINED WAYLAND_SCANNER)
30+ pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
31+ endif()
32
33 set(DEQP_XDG_SHELL_PROTOCOL ${WAYLAND_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml)
34 set(DEQP_XDG_SHELL_GEN_OUTPUTS_DIR ${PROJECT_BINARY_DIR}/framework/platform)
35--
362.37.3
37