aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-graphics/lunarg-sdk/vulkan-tools/0001-CMakeLists-add-include-paths-so-Xlib-and-XCB-are-fou.patch
blob: ecac1262fb394daceac3967af8a7e85fa5bbdb2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
From a6dc74817a8670155d06e6aec722e4219e789414 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Tue, 4 Sep 2018 16:54:17 +0500
Subject: [PATCH 1/2] CMakeLists: add include paths so Xlib and XCB are found
 as needed

All the targets including vk_platform.h or directly including
X11/Xlib.h or xcb.h require to know the directory for the
installed header. Add the directory to these so the requirements
are filled in properly.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 CMakeLists.txt                        | 1 +
 layer_factory/CMakeLists.txt          | 1 +
 layersvt/CMakeLists.txt               | 1 +
 vktrace/vktrace_common/CMakeLists.txt | 1 +
 vktrace/vktrace_layer/CMakeLists.txt  | 1 +
 vktrace/vktrace_replay/CMakeLists.txt | 1 +
 vktrace/vktrace_trace/CMakeLists.txt  | 1 +
 vktrace/vktrace_viewer/CMakeLists.txt | 5 +++++
 8 files changed, 12 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e19817efa..5298766c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 
     if (BUILD_WSI_XLIB_SUPPORT)
         find_package(X11 REQUIRED)
+        find_path(X11_XLIB_INCLUDE_DIR X11/Xlib.h DOC "Path to X11/Xlib.h")
     endif()
 
     if (BUILD_WSI_WAYLAND_SUPPORT)
diff --git a/layer_factory/CMakeLists.txt b/layer_factory/CMakeLists.txt
index e4355d8b2..88f2d8369 100644
--- a/layer_factory/CMakeLists.txt
+++ b/layer_factory/CMakeLists.txt
@@ -11,6 +11,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 
     if (BUILD_WSI_XLIB_SUPPORT)
        add_definitions(-DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_XLIB_KHX -DVK_USE_PLATFORM_XLIB_XRANDR_EXT)
+       include_directories(${X11_XLIB_INCLUDE_DIR})
     endif()
 
     if (BUILD_WSI_WAYLAND_SUPPORT)
diff --git a/layersvt/CMakeLists.txt b/layersvt/CMakeLists.txt
index d47f3c65a..9b780ce4d 100644
--- a/layersvt/CMakeLists.txt
+++ b/layersvt/CMakeLists.txt
@@ -136,6 +136,7 @@ include_directories(
     ${CMAKE_BINARY_DIR}/${V_LVL_RELATIVE_LOCATION}
     ${PROJECT_SOURCE_DIR}/../glslang/SPIRV
     ${JSONCPP_INCLUDE_DIR}
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 if (WIN32)
diff --git a/vktrace/vktrace_common/CMakeLists.txt b/vktrace/vktrace_common/CMakeLists.txt
index c9ad2ad8e..4c639c6d7 100644
--- a/vktrace/vktrace_common/CMakeLists.txt
+++ b/vktrace/vktrace_common/CMakeLists.txt
@@ -9,6 +9,7 @@ include_directories(
     ${SRC_DIR}/vktrace_common
     ${SRC_DIR}/thirdparty
     ${CMAKE_BINARY_DIR}/${V_LVL_RELATIVE_LOCATION}
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
diff --git a/vktrace/vktrace_layer/CMakeLists.txt b/vktrace/vktrace_layer/CMakeLists.txt
index 5cf48b34c..ea419a7ee 100644
--- a/vktrace/vktrace_layer/CMakeLists.txt
+++ b/vktrace/vktrace_layer/CMakeLists.txt
@@ -78,6 +78,7 @@ include_directories(
     ${CMAKE_BINARY_DIR}/${V_LVL_RELATIVE_LOCATION}
     ${V_LVL_ROOT_DIR}/include
     ${V_LVL_ROOT_DIR}/include/vulkan
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 # copy/link layer json file into build/layersvt directory
diff --git a/vktrace/vktrace_replay/CMakeLists.txt b/vktrace/vktrace_replay/CMakeLists.txt
index 191af81a8..0912c7f1f 100644
--- a/vktrace/vktrace_replay/CMakeLists.txt
+++ b/vktrace/vktrace_replay/CMakeLists.txt
@@ -70,6 +70,7 @@ include_directories(
     ${VKTRACE_VULKAN_INCLUDE_DIR}
     ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}/${V_LVL_RELATIVE_LOCATION}
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 
diff --git a/vktrace/vktrace_trace/CMakeLists.txt b/vktrace/vktrace_trace/CMakeLists.txt
index b1390d3fe..0dc0f5f8b 100644
--- a/vktrace/vktrace_trace/CMakeLists.txt
+++ b/vktrace/vktrace_trace/CMakeLists.txt
@@ -24,6 +24,7 @@ include_directories(
     ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}/${V_LVL_RELATIVE_LOCATION}
     ${GENERATED_FILES_DIR}
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 if (NOT WIN32)
diff --git a/vktrace/vktrace_viewer/CMakeLists.txt b/vktrace/vktrace_viewer/CMakeLists.txt
index 316e9bdba..171be773e 100644
--- a/vktrace/vktrace_viewer/CMakeLists.txt
+++ b/vktrace/vktrace_viewer/CMakeLists.txt
@@ -50,6 +50,9 @@ else()
 find_package(Threads REQUIRED)
 find_package(X11 REQUIRED)
 
+find_path(XCB_INCLUDE_DIR xcb/xcb.h DOC "Path to xcb/xcb.h")
+find_path(X11_XLIB_INCLUDE_DIR X11/Xlib.h DOC "Path to X11/Xlib.h")
+
 require_pthreads()
 
 include_directories(
@@ -61,6 +64,8 @@ include_directories(
     ${CMAKE_BINARY_DIR}/${V_LVL_RELATIVE_LOCATION}
     ${CMAKE_BINARY_DIR}
     ${Qt5Widgets_INCLUDE_DIRS}
+    ${X11_XLIB_INCLUDE_DIR}
+    ${XCB_INCLUDE_DIR}
 )
 
 set(SRC_LIST
-- 
2.11.1