diff options
author | Ethan Lee <[email protected]> | 2019-11-14 20:02:12 -0500 |
---|---|---|
committer | Jon Leech <[email protected]> | 2019-12-27 22:15:11 -0800 |
commit | f63dd5c9d874310c8403f3aef9302b761efedd18 (patch) | |
tree | 77dad83d5d1ad7815383912db63a72cb89072cff | |
parent | 0e57fc1cfa56a203efe43e4dfb9b3c9e9b105593 (diff) | |
download | Vulkan-Headers-f63dd5c9d874310c8403f3aef9302b761efedd18.tar.gz Vulkan-Headers-f63dd5c9d874310c8403f3aef9302b761efedd18.zip |
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.
-rw-r--r-- | BUILD.gn | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { |