2018-08-03 06:57:43 -07: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 14:52:44 -07:00
|
|
|
if (!defined(dawn_standalone)) {
|
|
|
|
dawn_standalone = false
|
|
|
|
}
|
|
|
|
|
2020-04-07 12:35:47 -07:00
|
|
|
if (!defined(dawn_has_build)) {
|
|
|
|
dawn_has_build = true
|
|
|
|
}
|
|
|
|
|
2019-03-06 17:46:39 -08:00
|
|
|
if (!defined(dawn_root)) {
|
|
|
|
dawn_root = get_path_info("..", "abspath")
|
|
|
|
}
|
2019-09-19 16:30:42 -07:00
|
|
|
dawn_gen_root = get_path_info("${dawn_root}", "gen_dir")
|
2019-03-06 17:46:39 -08:00
|
|
|
|
2018-10-04 10:17:57 -07:00
|
|
|
if (!defined(dawn_jinja2_dir)) {
|
|
|
|
dawn_jinja2_dir = "//third_party/jinja2"
|
2018-08-03 06:57:43 -07:00
|
|
|
}
|
|
|
|
|
2018-10-04 10:17:57 -07:00
|
|
|
if (!defined(dawn_glfw_dir)) {
|
|
|
|
dawn_glfw_dir = "//third_party/glfw"
|
2020-05-26 18:33:33 -07:00
|
|
|
}
|
|
|
|
|
2018-10-04 10:17:57 -07:00
|
|
|
if (!defined(dawn_googletest_dir)) {
|
|
|
|
dawn_googletest_dir = "//third_party/googletest"
|
2018-08-03 06:57:43 -07:00
|
|
|
}
|
|
|
|
|
2018-10-04 10:17:57 -07:00
|
|
|
if (!defined(dawn_spirv_tools_dir)) {
|
2021-01-06 09:41:50 -08:00
|
|
|
dawn_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
|
2018-08-13 08:47:44 -07:00
|
|
|
}
|
2019-11-07 04:13:27 -08:00
|
|
|
|
2019-11-26 10:21:51 -08:00
|
|
|
if (!defined(dawn_swiftshader_dir)) {
|
|
|
|
# Default to swiftshader not being available.
|
|
|
|
dawn_swiftshader_dir = ""
|
|
|
|
}
|
|
|
|
|
2022-04-08 17:10:08 -07:00
|
|
|
if (!defined(dawn_vulkan_deps_dir)) {
|
|
|
|
dawn_vulkan_deps_dir = "//third_party/vulkan-deps"
|
2022-03-31 22:22:55 -07:00
|
|
|
if (dawn_standalone) {
|
2022-04-08 17:10:08 -07:00
|
|
|
dawn_vulkan_deps_dir = "${dawn_root}/third_party/vulkan-deps"
|
2022-03-31 22:22:55 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-08 17:10:08 -07:00
|
|
|
if (!defined(dawn_vulkan_headers_dir)) {
|
|
|
|
dawn_vulkan_headers_dir = "${dawn_vulkan_deps_dir}/vulkan-headers/src"
|
|
|
|
}
|
|
|
|
|
2020-04-17 01:22:25 -07:00
|
|
|
if (!defined(dawn_vulkan_loader_dir)) {
|
2021-12-01 17:05:41 -08:00
|
|
|
# Default to the Vulkan loader not being available except in standalone.
|
|
|
|
dawn_vulkan_loader_dir = ""
|
|
|
|
if (dawn_standalone) {
|
|
|
|
dawn_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src"
|
|
|
|
}
|
2020-04-17 01:22:25 -07:00
|
|
|
}
|
|
|
|
|
2022-04-08 17:10:08 -07:00
|
|
|
if (!defined(dawn_vulkan_tools_dir)) {
|
|
|
|
dawn_vulkan_tools_dir = "${dawn_vulkan_deps_dir}/vulkan-tools/src"
|
|
|
|
}
|
|
|
|
|
2020-04-08 13:00:12 -07:00
|
|
|
if (!defined(dawn_vulkan_validation_layers_dir)) {
|
|
|
|
# Default to VVLs not being available.
|
|
|
|
dawn_vulkan_validation_layers_dir = ""
|
2019-11-07 04:13:27 -08:00
|
|
|
}
|
2020-05-07 14:15:55 -07:00
|
|
|
|
2021-09-23 13:36:03 -07:00
|
|
|
if (!defined(dawn_abseil_dir)) {
|
|
|
|
dawn_abseil_dir = "//third_party/abseil-cpp"
|
|
|
|
}
|
2022-06-21 21:19:43 -07:00
|
|
|
|
|
|
|
if (!defined(dawn_version_file)) {
|
|
|
|
dawn_version_file = ""
|
|
|
|
}
|