aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-graphics/lunarg-sdk/vulkan-loader-layers/0001-CMakeLists-add-include-path-so-Xlib.h-is-found-as-ne.patch
blob: df871c688afa1c2ddf2c59428a41bc39ea0cba86 (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 31f4c33da2d988f2ac3d3f2cdd97cae4085abe19 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Wed, 31 May 2017 13:26:39 +0500
Subject: [PATCH 1/3] 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 b53696fb0..2d97f7a0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,6 +187,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 917ea8840..472d1528b 100644
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
@@ -19,7 +19,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
         if (NOT BUILD_WSI_XLIB_SUPPORT)
             message( FATAL_ERROR "Selected XLIB for demos build but not building Xlib support" )
         endif()
-        include_directories(${X11_INCLUDE_DIR})
+        include_directories(${X11_INCLUDE_DIR} ${X11_XLIB_INCLUDE_DIR})
         link_libraries(${X11_LIBRARIES})
         add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
     elseif(DEMOS_WSI_SELECTION STREQUAL "WAYLAND")
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 7a35df7ec..5543808e5 100644
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -115,6 +115,7 @@ include_directories(
     ${CMAKE_CURRENT_BINARY_DIR}
     ${CMAKE_PROJECT_BINARY_DIR}
     ${CMAKE_BINARY_DIR}
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 if (WIN32)
diff --git a/libs/vkjson/CMakeLists.txt b/libs/vkjson/CMakeLists.txt
index 2e79d9109..4b1df5988 100644
--- a/libs/vkjson/CMakeLists.txt
+++ b/libs/vkjson/CMakeLists.txt
@@ -23,6 +23,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 d15f09cc9..e7dd6d358 100644
--- a/loader/CMakeLists.txt
+++ b/loader/CMakeLists.txt
@@ -3,6 +3,7 @@ include_directories(
     ${CMAKE_CURRENT_BINARY_DIR}
     ${CMAKE_PROJECT_BINARY_DIR}
     ${CMAKE_BINARY_DIR}
+    ${X11_XLIB_INCLUDE_DIR}
 )
 
 # Check for the existance of the secure_getenv or __secure_getenv commands
-- 
2.11.1