1 # Copyright (C) 2018-2019 The ANGLE Project Authors.
2 # Copyright (C) 2019-2023 LunarG, Inc.
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
8 # https://www.apache.org/licenses/LICENSE-2.0
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.
16 import("//build_overrides/build.gni")
17 import("//build_overrides/vulkan_tools.gni")
20 vulkan_undefine_configs = []
21 if (is_win && build_with_chromium) {
22 vulkan_undefine_configs += [
23 "//build/config/win:nominmax",
24 "//build/config/win:unicode",
30 shared_library("VkICD_mock_icd") {
31 configs -= vulkan_undefine_configs
33 "$vulkan_headers_dir:vulkan_headers"
35 data_deps = [ ":vulkan_gen_icd_json_file" ]
39 "icd/generated/function_declarations.h",
40 "icd/generated/function_definitions.h",
41 "icd/generated/vk_typemap_helper.h",
48 sources += [ "icd/VkICD_mock_icd.def" ]
50 if (build_with_chromium) {
51 configs -= [ "//build/config/compiler:chromium_code" ]
52 configs += [ "//build/config/compiler:no_chromium_code" ]
56 action("vulkan_gen_icd_json_file") {
57 script = "scripts/gn/generate_vulkan_icd_json.py"
59 public_deps = [ "$vulkan_headers_dir:vulkan_headers" ]
61 sources = [ "icd/VkICD_mock_icd.json.in" ]
63 vulkan_data_dir = "$root_out_dir/$vulkan_data_subdir"
65 outputs = [ "$vulkan_data_dir/VkICD_mock_icd.json" ]
73 } else if (is_fuchsia) {
81 "--platform", _platform,
82 rebase_path("icd/", root_build_dir),
83 rebase_path(vulkan_data_dir, root_build_dir)
84 ] + rebase_path(sources, root_build_dir)
87 args += [ "--no-path-prefix" ]