From f63dd5c9d874310c8403f3aef9302b761efedd18 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Thu, 14 Nov 2019 20:02:12 -0500 Subject: [PATCH] GN: Make PLATFORM_XCB optional, based on a user-defined variable. Not all Linux platforms will have X11 available (Wayland, GGP), so we have to declare a variable that checks use_x11 separately. --- BUILD.gn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 79d186f..67b9cf6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,13 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build_overrides/vulkan_headers.gni") + config("vulkan_headers_config") { include_dirs = [ "include" ] if (is_win) { defines = [ "VK_USE_PLATFORM_WIN32_KHR" ] } - if (is_linux) { + if (defined(vulkan_use_x11) && vulkan_use_x11) { defines = [ "VK_USE_PLATFORM_XCB_KHR" ] } if (is_android) {