aboutsummaryrefslogtreecommitdiffhomepage
path: root/BUILD.gn
diff options
context:
space:
mode:
authorEthan Lee <[email protected]>2019-11-14 20:02:12 -0500
committerJon Leech <[email protected]>2019-12-27 22:15:11 -0800
commitf63dd5c9d874310c8403f3aef9302b761efedd18 (patch)
tree77dad83d5d1ad7815383912db63a72cb89072cff /BUILD.gn
parent0e57fc1cfa56a203efe43e4dfb9b3c9e9b105593 (diff)
downloadVulkan-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.
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn4
1 files changed, 3 insertions, 1 deletions
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) {