GN Build: Add a way to skip xlib includes
Xlib headers `#define` really common names and are problematic when
included in various places.
0f0cfd88d7 added VK_USE_PLATFORM_XLIB_KHR
when vulkan_use_x11=true, alongside the pre-existing
VK_USE_PLATFORM_XCB_KHR. In this change, VK_USE_PLATFORM_XLIB_KHR is
only added if vulkan_no_xlib_headers=false, so projects can opt out of
xlib includes.
This commit is contained in:
parent
2e0a6e699e
commit
2efaa559ff
1 changed files with 4 additions and 4 deletions
8
BUILD.gn
8
BUILD.gn
|
|
@ -13,10 +13,10 @@ config("vulkan_headers_config") {
|
|||
defines += [ "VK_USE_PLATFORM_WIN32_KHR" ]
|
||||
}
|
||||
if (defined(vulkan_use_x11) && vulkan_use_x11) {
|
||||
defines += [
|
||||
"VK_USE_PLATFORM_XCB_KHR",
|
||||
"VK_USE_PLATFORM_XLIB_KHR",
|
||||
]
|
||||
defines += [ "VK_USE_PLATFORM_XCB_KHR" ]
|
||||
if (!defined(vulkan_no_xlib_headers) || !vulkan_no_xlib_headers) {
|
||||
defines += [ "VK_USE_PLATFORM_XLIB_KHR" ]
|
||||
}
|
||||
}
|
||||
if (defined(vulkan_use_wayland) && vulkan_use_wayland) {
|
||||
defines += [ "VK_USE_PLATFORM_WAYLAND_KHR" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue