1 | # Copyright 2018-2023 The ANGLE Project Authors.
|
---|
2 | # Copyright 2019-2023 LunarG, Inc.
|
---|
3 | #
|
---|
4 | # SPDX-License-Identifier: Apache-2.0
|
---|
5 |
|
---|
6 | import("//build_overrides/vulkan_headers.gni")
|
---|
7 |
|
---|
8 | config("vulkan_headers_config") {
|
---|
9 | include_dirs = [ "include" ]
|
---|
10 | defines = []
|
---|
11 |
|
---|
12 | if (is_win) {
|
---|
13 | defines += [ "VK_USE_PLATFORM_WIN32_KHR" ]
|
---|
14 | }
|
---|
15 | if (defined(vulkan_use_x11) && vulkan_use_x11) {
|
---|
16 | defines += [ "VK_USE_PLATFORM_XCB_KHR" ]
|
---|
17 | }
|
---|
18 | if (defined(vulkan_use_wayland) && vulkan_use_wayland) {
|
---|
19 | defines += [ "VK_USE_PLATFORM_WAYLAND_KHR" ]
|
---|
20 | if (defined(vulkan_wayland_include_dirs)) {
|
---|
21 | include_dirs += vulkan_wayland_include_dirs
|
---|
22 | }
|
---|
23 | }
|
---|
24 | if (is_android) {
|
---|
25 | defines += [ "VK_USE_PLATFORM_ANDROID_KHR" ]
|
---|
26 | }
|
---|
27 | if (is_fuchsia) {
|
---|
28 | defines += [ "VK_USE_PLATFORM_FUCHSIA" ]
|
---|
29 | }
|
---|
30 | if (is_apple) {
|
---|
31 | defines += [ "VK_USE_PLATFORM_METAL_EXT" ]
|
---|
32 | }
|
---|
33 | if (is_mac) {
|
---|
34 | defines += [ "VK_USE_PLATFORM_MACOS_MVK" ]
|
---|
35 | }
|
---|
36 | if (is_ios) {
|
---|
37 | defines += [ "VK_USE_PLATFORM_IOS_MVK" ]
|
---|
38 | }
|
---|
39 | if (defined(is_ggp) && is_ggp) {
|
---|
40 | defines += [ "VK_USE_PLATFORM_GGP" ]
|
---|
41 | }
|
---|
42 | if (is_clang) {
|
---|
43 | cflags = [
|
---|
44 | "-Wno-redundant-parens",
|
---|
45 | ]
|
---|
46 | }
|
---|
47 | }
|
---|
48 |
|
---|
49 | # Vulkan headers only, no compiled sources.
|
---|
50 | source_set("vulkan_headers") {
|
---|
51 | sources = [
|
---|
52 | "include/vulkan/vk_icd.h",
|
---|
53 | "include/vulkan/vk_layer.h",
|
---|
54 | "include/vulkan/vk_platform.h",
|
---|
55 | "include/vulkan/vulkan.h",
|
---|
56 | "include/vulkan/vulkan.hpp",
|
---|
57 | "include/vulkan/vulkan_core.h",
|
---|
58 | "include/vulkan/vulkan_screen.h",
|
---|
59 | "include/vk_video/vulkan_video_codec_av1std_decode.h",
|
---|
60 | "include/vk_video/vulkan_video_codec_av1std.h",
|
---|
61 | "include/vk_video/vulkan_video_codec_h264std_decode.h",
|
---|
62 | "include/vk_video/vulkan_video_codec_h264std_encode.h",
|
---|
63 | "include/vk_video/vulkan_video_codec_h264std.h",
|
---|
64 | "include/vk_video/vulkan_video_codec_h265std_decode.h",
|
---|
65 | "include/vk_video/vulkan_video_codec_h265std_encode.h",
|
---|
66 | "include/vk_video/vulkan_video_codec_h265std.h",
|
---|
67 | "include/vk_video/vulkan_video_codecs_common.h",
|
---|
68 | ]
|
---|
69 | public_configs = [ ":vulkan_headers_config" ]
|
---|
70 | }
|
---|