Mike Schuchardt | c277ce5 | 2019-04-19 08:39:51 -0700 | [diff] [blame] | 1 | # Copyright (C) 2018-2019 The ANGLE Project Authors. |
| 2 | # Copyright (C) 2019 LunarG, Inc. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Ethan Lee | f63dd5c | 2019-11-14 20:02:12 -0500 | [diff] [blame] | 16 | import("//build_overrides/vulkan_headers.gni") |
| 17 | |
Mike Schuchardt | c277ce5 | 2019-04-19 08:39:51 -0700 | [diff] [blame] | 18 | config("vulkan_headers_config") { |
| 19 | include_dirs = [ "include" ] |
| 20 | |
| 21 | if (is_win) { |
| 22 | defines = [ "VK_USE_PLATFORM_WIN32_KHR" ] |
| 23 | } |
Ethan Lee | f63dd5c | 2019-11-14 20:02:12 -0500 | [diff] [blame] | 24 | if (defined(vulkan_use_x11) && vulkan_use_x11) { |
Mike Schuchardt | c277ce5 | 2019-04-19 08:39:51 -0700 | [diff] [blame] | 25 | defines = [ "VK_USE_PLATFORM_XCB_KHR" ] |
| 26 | } |
| 27 | if (is_android) { |
| 28 | defines = [ "VK_USE_PLATFORM_ANDROID_KHR" ] |
| 29 | } |
| 30 | if (is_fuchsia) { |
| 31 | defines = [ "VK_USE_PLATFORM_FUCHSIA" ] |
| 32 | } |
Jonah Ryan-Davis | 52c2645 | 2019-10-25 10:29:12 -0600 | [diff] [blame] | 33 | if (is_mac) { |
| 34 | defines = [ "VK_USE_PLATFORM_METAL_EXT" ] |
| 35 | } |
Jamie Madill | d42d074 | 2019-11-05 07:34:03 -0500 | [diff] [blame] | 36 | if (defined(is_ggp) && is_ggp) { |
| 37 | defines = [ "VK_USE_PLATFORM_GGP" ] |
| 38 | } |
Mike Schuchardt | c277ce5 | 2019-04-19 08:39:51 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | # Vulkan headers only, no compiled sources. |
| 42 | source_set("vulkan_headers") { |
| 43 | sources = [ |
| 44 | "include/vulkan/vk_icd.h", |
| 45 | "include/vulkan/vk_layer.h", |
| 46 | "include/vulkan/vk_platform.h", |
| 47 | "include/vulkan/vk_sdk_platform.h", |
| 48 | "include/vulkan/vulkan.h", |
| 49 | "include/vulkan/vulkan.hpp", |
| 50 | "include/vulkan/vulkan_core.h", |
| 51 | ] |
| 52 | public_configs = [ ":vulkan_headers_config" ] |
| 53 | } |
| 54 | |