aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amdfalconx86/recipes-graphics/lunarg-sdk/vulkan-loader-layers/0001-CMakeLists-add-include-path-so-Xlib.h-is-found-as-ne.patch
blob: 05fbd360a0959078298dfb0c5da23ba94318f014 (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
From 32f2777c9cc8f7dfc8b1e0c6894191167e76d5c4 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Tue, 16 Aug 2016 19:35:35 +0500
Subject: [PATCH] CMakeLists: add include path so Xlib.h is found as needed

All the targets including vk_platform.h or directly including
X11/Xlib.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             | 2 ++
 demos/CMakeLists.txt       | 2 +-
 layers/CMakeLists.txt      | 1 +
 libs/vkjson/CMakeLists.txt | 1 +
 loader/CMakeLists.txt      | 1 +
 5 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 263002e..20e9fd6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -190,6 +190,8 @@ find_path(SPIRV_TOOLS_INCLUDE_DIR spirv-tools/libspirv.h HINTS "${EXTERNAL_SOURC
                                                    "${EXTERNAL_SOURCE_ROOT}/source/spirv-tools/external/include"
                                              DOC "Path to spirv-tools/libspirv.h")
 
+find_path(X11_XLIB_INCLUDE_DIR X11/Xlib.h DOC "Path to X11/Xlib.h")
+
 find_library(GLSLANG_LIB NAMES glslang
              HINTS ${GLSLANG_SEARCH_PATH} )
 
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
index 26e86fb..9fdabf8 100644
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
@@ -92,7 +92,7 @@ if(NOT WIN32)
         link_libraries(${XCB_LIBRARIES})
     endif()
     if(BUILD_WSI_XLIB_SUPPORT)
-        include_directories(${X11_INCLUDE_DIRS})
+        include_directories(${X11_INCLUDE_DIRS} ${X11_XLIB_INCLUDE_DIR})
         link_libraries(${X11_LIBRARIES})
     endif()
     if(BUILD_WSI_WAYLAND_SUPPORT)
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 076b847..b384803 100644
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -90,6 +90,7 @@ include_directories(
     ${CMAKE_CURRENT_SOURCE_DIR}/../loader
     ${CMAKE_CURRENT_SOURCE_DIR}/../include/vulkan
     ${CMAKE_CURRENT_BINARY_DIR}
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 if (WIN32)
diff --git a/libs/vkjson/CMakeLists.txt b/libs/vkjson/CMakeLists.txt
index fc69bb6..fe5e814 100644
--- a/libs/vkjson/CMakeLists.txt
+++ b/libs/vkjson/CMakeLists.txt
@@ -26,6 +26,7 @@ include_directories(
 	${CMAKE_CURRENT_SOURCE_DIR}
 	${CMAKE_CURRENT_SOURCE_DIR}/../../loader
 	${CMAKE_CURRENT_SOURCE_DIR}/../../include/vulkan
+	${X11_XLIB_INCLUDE_DIR}
 	)
 
 add_library(vkjson STATIC vkjson.cc vkjson_instance.cc ../../loader/cJSON.c)
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
index a4d2b21..227162c 100644
--- a/loader/CMakeLists.txt
+++ b/loader/CMakeLists.txt
@@ -1,6 +1,7 @@
 include_directories(
 	${CMAKE_CURRENT_SOURCE_DIR}
 	${CMAKE_CURRENT_BINARY_DIR}
+	${X11_XLIB_INCLUDE_DIR}
 )
 
 if (WIN32)
-- 
1.9.1