aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Jones <bajones@chromium.org>2022-08-31 14:23:52 -0700
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2022-09-02 11:56:50 -0600
commit1ef7bc1547db9b85bedb5792f958fdcdb5ecd97a (patch)
tree83e9badb99164f73515bbbc2af23e8eeba096066
parent088cfe80472564874bb45fe818e6c2440bf35b80 (diff)
downloadvulkan-tools-1ef7bc1547db9b85bedb5792f958fdcdb5ecd97a.tar.gz
Move BUILD.gn values into the scope that uses them
There are several values that in the build file that are only used when the platform is not Android, but which are declared outside the `if(!is_android)` block. This causes unused variable errors when attempting to build chromium on Android with a dependency on this repo. By moving the definitions into the conditional block the error is resolved.
-rw-r--r--BUILD.gn26
1 files changed, 13 insertions, 13 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 47638be9..f5650304 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -20,19 +20,6 @@ import("//build_overrides/vulkan_tools.gni")
# TODO(spang): Port mock ICD to Fuchsia.
assert(!is_fuchsia)
-vulkan_undefine_configs = []
-if (is_win && build_with_chromium) {
- vulkan_undefine_configs += [
- "//build/config/win:nominmax",
- "//build/config/win:unicode",
- ]
-}
-
-raw_vulkan_icd_dir = rebase_path("icd", root_build_dir)
-
-vulkan_data_dir = "$root_out_dir/$vulkan_data_subdir"
-raw_vulkan_data_dir = rebase_path(vulkan_data_dir, root_build_dir)
-
config("vulkan_internal_config") {
defines = [ "VULKAN_NON_CMAKE_BUILD" ]
if (is_clang || !is_win) {
@@ -56,6 +43,19 @@ source_set("vulkan_tools_headers") {
}
if (!is_android) {
+ vulkan_undefine_configs = []
+ if (is_win && build_with_chromium) {
+ vulkan_undefine_configs += [
+ "//build/config/win:nominmax",
+ "//build/config/win:unicode",
+ ]
+ }
+
+ raw_vulkan_icd_dir = rebase_path("icd", root_build_dir)
+
+ vulkan_data_dir = "$root_out_dir/$vulkan_data_subdir"
+ raw_vulkan_data_dir = rebase_path(vulkan_data_dir, root_build_dir)
+
# Vulkan Mock ICD
# ---------------
shared_library("VkICD_mock_icd") {