2018-08-03 13:57:43 +00:00
|
|
|
# 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")
|
|
|
|
|
2018-09-25 21:52:44 +00:00
|
|
|
if (!defined(dawn_standalone)) {
|
|
|
|
dawn_standalone = false
|
|
|
|
}
|
|
|
|
|
2019-03-07 01:46:39 +00:00
|
|
|
if (!defined(dawn_root)) {
|
|
|
|
dawn_root = get_path_info("..", "abspath")
|
|
|
|
}
|
2019-09-19 23:30:42 +00:00
|
|
|
dawn_gen_root = get_path_info("${dawn_root}", "gen_dir")
|
2019-03-07 01:46:39 +00:00
|
|
|
|
2018-10-04 17:17:57 +00:00
|
|
|
if (!defined(dawn_jinja2_dir)) {
|
|
|
|
dawn_jinja2_dir = "//third_party/jinja2"
|
2018-08-03 13:57:43 +00:00
|
|
|
}
|
|
|
|
|
2018-10-04 17:17:57 +00:00
|
|
|
if (!defined(dawn_glfw_dir)) {
|
|
|
|
dawn_glfw_dir = "//third_party/glfw"
|
2018-08-03 13:57:43 +00:00
|
|
|
}
|
|
|
|
|
2018-10-04 17:17:57 +00:00
|
|
|
if (!defined(dawn_googletest_dir)) {
|
|
|
|
dawn_googletest_dir = "//third_party/googletest"
|
2018-08-03 13:57:43 +00:00
|
|
|
}
|
|
|
|
|
2019-10-17 19:00:32 +00:00
|
|
|
if (!defined(dawn_jsoncpp_dir)) {
|
|
|
|
dawn_jsoncpp_dir = "//third_party/jsoncpp"
|
|
|
|
}
|
|
|
|
|
2018-08-03 13:57:43 +00:00
|
|
|
if (!defined(dawn_shaderc_dir)) {
|
|
|
|
dawn_shaderc_dir = "//third_party/shaderc"
|
|
|
|
}
|
|
|
|
|
2018-10-04 17:17:57 +00:00
|
|
|
if (!defined(dawn_spirv_cross_dir)) {
|
|
|
|
dawn_spirv_cross_dir = "//third_party/spirv-cross"
|
2018-08-03 13:57:43 +00:00
|
|
|
}
|
2018-08-13 15:47:44 +00:00
|
|
|
|
2018-10-04 17:17:57 +00:00
|
|
|
if (!defined(dawn_spirv_tools_dir)) {
|
|
|
|
dawn_spirv_tools_dir = "//third_party/SPIRV-Tools"
|
2018-08-13 15:47:44 +00:00
|
|
|
}
|
2019-11-07 12:13:27 +00:00
|
|
|
|
2019-11-26 18:21:51 +00:00
|
|
|
if (!defined(dawn_swiftshader_dir)) {
|
|
|
|
# Default to swiftshader not being available.
|
|
|
|
dawn_swiftshader_dir = ""
|
|
|
|
}
|
|
|
|
|
2019-11-07 12:13:27 +00:00
|
|
|
if (!defined(dawn_vulkan_validaion_layers_dir)) {
|
|
|
|
dawn_vulkan_validaion_layers_dir = "//third_party/vulkan-validation-layers"
|
|
|
|
}
|