dawn-cmake/scripts/dawn_overrides_with_defaults.gni
Corentin Wallez a9a84dfe1e BUILD.gn: Delete stale generated files in Dawn's gen dir.
This normalizes even more the directory structure of generated files in
Dawn and removes stale autogenerated files that could be included
wrongly using a GN action.

See comment on top of dawn_generator.gni in this commit for more
context.

BUG=dawn:22

Change-Id: I8ec038f949c048431b2b643af4462f98c4ae610b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11361
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-19 23:30:42 +00:00

55 lines
1.5 KiB
Plaintext

# Copyright 2018 The Dawn Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This files imports the overrides for Dawn but sets the defaults so that
# projects including Dawn don't have to set dirs if they happen to use the
# same.
# It takes advantage of GN's variable scoping rules to define global variables
# inside if constructs.
import("//build_overrides/dawn.gni")
if (!defined(dawn_standalone)) {
dawn_standalone = false
}
if (!defined(dawn_root)) {
dawn_root = get_path_info("..", "abspath")
}
dawn_gen_root = get_path_info("${dawn_root}", "gen_dir")
if (!defined(dawn_jinja2_dir)) {
dawn_jinja2_dir = "//third_party/jinja2"
}
if (!defined(dawn_glfw_dir)) {
dawn_glfw_dir = "//third_party/glfw"
}
if (!defined(dawn_googletest_dir)) {
dawn_googletest_dir = "//third_party/googletest"
}
if (!defined(dawn_shaderc_dir)) {
dawn_shaderc_dir = "//third_party/shaderc"
}
if (!defined(dawn_spirv_cross_dir)) {
dawn_spirv_cross_dir = "//third_party/spirv-cross"
}
if (!defined(dawn_spirv_tools_dir)) {
dawn_spirv_tools_dir = "//third_party/SPIRV-Tools"
}