1e8556ba3Sopenharmony_ci# Copyright 2018-2023 The ANGLE Project Authors.
2e8556ba3Sopenharmony_ci# Copyright 2019-2023 LunarG, Inc.
3e8556ba3Sopenharmony_ci#
4e8556ba3Sopenharmony_ci# SPDX-License-Identifier: Apache-2.0
5e8556ba3Sopenharmony_ci
6e8556ba3Sopenharmony_ciimport("//build/ohos.gni")
7e8556ba3Sopenharmony_ci
8e8556ba3Sopenharmony_ciis_ohos = current_os == "ohos"
9e8556ba3Sopenharmony_ciis_android = current_os == "android"
10e8556ba3Sopenharmony_ciis_mac = current_os == "ios" || current_os == "tvos" || current_os == "mac"
11e8556ba3Sopenharmony_ciis_win = current_os == "win" || current_os == "mingw"
12e8556ba3Sopenharmony_ciis_fuchsia = current_os == "fuchsia"
13e8556ba3Sopenharmony_ciis_apple = current_os == "apple"
14e8556ba3Sopenharmony_ci
15e8556ba3Sopenharmony_ciconfig("vulkan_headers_config") {
16e8556ba3Sopenharmony_ci  include_dirs = [ "include" ]
17e8556ba3Sopenharmony_ci  defines = []
18e8556ba3Sopenharmony_ci
19e8556ba3Sopenharmony_ci  if (is_ohos) {
20e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_OHOS" ]
21e8556ba3Sopenharmony_ci  }
22e8556ba3Sopenharmony_ci
23e8556ba3Sopenharmony_ci  if (is_win) {
24e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_WIN32_KHR" ]
25e8556ba3Sopenharmony_ci  }
26e8556ba3Sopenharmony_ci  if (defined(vulkan_use_x11) && vulkan_use_x11) {
27e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_XCB_KHR" ]
28e8556ba3Sopenharmony_ci  }
29e8556ba3Sopenharmony_ci  if (defined(vulkan_use_wayland) && vulkan_use_wayland) {
30e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_WAYLAND_KHR" ]
31e8556ba3Sopenharmony_ci    if (defined(vulkan_wayland_include_dirs)) {
32e8556ba3Sopenharmony_ci      include_dirs += vulkan_wayland_include_dirs
33e8556ba3Sopenharmony_ci    }
34e8556ba3Sopenharmony_ci  }
35e8556ba3Sopenharmony_ci  if (is_android) {
36e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_ANDROID_KHR" ]
37e8556ba3Sopenharmony_ci  }
38e8556ba3Sopenharmony_ci  if (is_fuchsia) {
39e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_FUCHSIA" ]
40e8556ba3Sopenharmony_ci  }
41e8556ba3Sopenharmony_ci  if (is_apple) {
42e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_METAL_EXT" ]
43e8556ba3Sopenharmony_ci  }
44e8556ba3Sopenharmony_ci  if (is_mac) {
45e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_MACOS_MVK" ]
46e8556ba3Sopenharmony_ci  }
47e8556ba3Sopenharmony_ci  if (is_ios) {
48e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_IOS_MVK" ]
49e8556ba3Sopenharmony_ci  }
50e8556ba3Sopenharmony_ci  if (defined(is_ggp) && is_ggp) {
51e8556ba3Sopenharmony_ci    defines += [ "VK_USE_PLATFORM_GGP" ]
52e8556ba3Sopenharmony_ci  }
53e8556ba3Sopenharmony_ci  if (is_clang) {
54e8556ba3Sopenharmony_ci    cflags = [ "-Wno-redundant-parens" ]
55e8556ba3Sopenharmony_ci  }
56e8556ba3Sopenharmony_ci}
57e8556ba3Sopenharmony_ci
58e8556ba3Sopenharmony_ci# Vulkan headers only, no compiled sources.
59e8556ba3Sopenharmony_ciohos_static_library("vulkan_headers") {
60e8556ba3Sopenharmony_ci  sources = [
61e8556ba3Sopenharmony_ci    "include/vk_video/vulkan_video_codec_h264std.h",
62e8556ba3Sopenharmony_ci    "include/vk_video/vulkan_video_codec_h264std_decode.h",
63e8556ba3Sopenharmony_ci    "include/vk_video/vulkan_video_codec_h264std_encode.h",
64e8556ba3Sopenharmony_ci    "include/vk_video/vulkan_video_codec_h265std.h",
65e8556ba3Sopenharmony_ci    "include/vk_video/vulkan_video_codec_h265std_decode.h",
66e8556ba3Sopenharmony_ci    "include/vk_video/vulkan_video_codec_h265std_encode.h",
67e8556ba3Sopenharmony_ci    "include/vk_video/vulkan_video_codecs_common.h",
68e8556ba3Sopenharmony_ci    "include/vulkan/vk_icd.h",
69e8556ba3Sopenharmony_ci    "include/vulkan/vk_layer.h",
70e8556ba3Sopenharmony_ci    "include/vulkan/vk_platform.h",
71e8556ba3Sopenharmony_ci    "include/vulkan/vulkan.h",
72e8556ba3Sopenharmony_ci    "include/vulkan/vulkan.hpp",
73e8556ba3Sopenharmony_ci    "include/vulkan/vulkan_core.h",
74e8556ba3Sopenharmony_ci    "include/vulkan/vulkan_ohos.h",
75e8556ba3Sopenharmony_ci    "include/vulkan/vulkan_screen.h",
76e8556ba3Sopenharmony_ci  ]
77e8556ba3Sopenharmony_ci  public_configs = [ ":vulkan_headers_config" ]
78e8556ba3Sopenharmony_ci
79e8556ba3Sopenharmony_ci  license_file = "//third_party/vulkan-headers/LICENSES/Apache-2.0.txt"
80e8556ba3Sopenharmony_ci}
81