summaryrefslogtreecommitdiffhomepage
path: root/BUILD.gn
diff options
context:
space:
mode:
authorAntonio Caggiano <[email protected]>2021-12-21 13:31:04 +0100
committerMike Schuchardt <[email protected]>2022-01-12 09:43:48 -0800
commit0873a22a11ec7e3f13762900ad0da39206189886 (patch)
tree7793279471549de4def62cd59c1ff0aacf151b62 /BUILD.gn
parentd99496fcb1f4aecbeb25c1e70eda0cdee7e1eba5 (diff)
downloadVulkan-Headers-0873a22a11ec7e3f13762900ad0da39206189886.tar.gz
Vulkan-Headers-0873a22a11ec7e3f13762900ad0da39206189886.zip
GN: Support Wayland platform
Following the approach taken with XCB, add support for Wayland based on user-defined variable.
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn16
1 files changed, 10 insertions, 6 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 27a14df..296171d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -17,24 +17,28 @@ import("//build_overrides/vulkan_headers.gni")
config("vulkan_headers_config") {
include_dirs = [ "include" ]
+ defines = []
if (is_win) {
- defines = [ "VK_USE_PLATFORM_WIN32_KHR" ]
+ defines += [ "VK_USE_PLATFORM_WIN32_KHR" ]
}
if (defined(vulkan_use_x11) && vulkan_use_x11) {
- defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
+ defines += [ "VK_USE_PLATFORM_XCB_KHR" ]
+ }
+ if (defined(vulkan_use_wayland) && vulkan_use_wayland) {
+ defines += [ "VK_USE_PLATFORM_WAYLAND_KHR" ]
}
if (is_android) {
- defines = [ "VK_USE_PLATFORM_ANDROID_KHR" ]
+ defines += [ "VK_USE_PLATFORM_ANDROID_KHR" ]
}
if (is_fuchsia) {
- defines = [ "VK_USE_PLATFORM_FUCHSIA" ]
+ defines += [ "VK_USE_PLATFORM_FUCHSIA" ]
}
if (is_mac) {
- defines = [ "VK_USE_PLATFORM_METAL_EXT" ]
+ defines += [ "VK_USE_PLATFORM_METAL_EXT" ]
}
if (defined(is_ggp) && is_ggp) {
- defines = [ "VK_USE_PLATFORM_GGP" ]
+ defines += [ "VK_USE_PLATFORM_GGP" ]
}
}