Make #define values public in BUILD.gn
This is needed to allow users to actually use tint/tint.h
BUG=tint:87
Change-Id: I70c9397a0497feca88ccf8879a3d0e8a03ab8471
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/23260
Reviewed-by: dan sinclair <dsinclair@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index c938abb..25a43e8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -21,6 +21,16 @@
###############################################################################
config("tint_common_config") {
+ include_dirs = [
+ "${target_gen_dir}",
+ "${tint_root_dir}/",
+ "${tint_spirv_headers_dir}/include",
+ "${tint_spirv_tools_dir}/",
+ "${tint_spirv_tools_dir}/include",
+ ]
+}
+
+config("tint_public_config") {
defines = []
if (tint_build_spv_reader) {
defines += [ "TINT_BUILD_SPV_READER=1" ]
@@ -47,11 +57,8 @@
}
include_dirs = [
- "${target_gen_dir}",
"${tint_root_dir}/",
- "${tint_spirv_headers_dir}/include",
- "${tint_spirv_tools_dir}/",
- "${tint_spirv_tools_dir}/include",
+ "${tint_root_dir}/include/",
]
}
@@ -358,6 +365,7 @@
]
configs += [ ":tint_common_config" ]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -393,6 +401,7 @@
]
configs += [ ":tint_common_config" ]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -417,6 +426,7 @@
]
configs += [ ":tint_common_config" ]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -437,6 +447,7 @@
]
configs += [ ":tint_common_config" ]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -453,6 +464,7 @@
]
configs += [ ":tint_common_config" ]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -460,13 +472,6 @@
}
}
-config("libtint_public_config") {
- include_dirs = [
- "${tint_root_dir}/",
- "${tint_root_dir}/include/",
- ]
-}
-
source_set("libtint") {
deps = [ ":libtint_core_src" ]
@@ -487,7 +492,7 @@
}
configs += [ ":tint_common_config" ]
- public_configs = [ ":libtint_public_config" ]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -630,6 +635,7 @@
":tint_common_config",
":tint_unittests_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -671,6 +677,7 @@
":tint_common_config",
":tint_unittests_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -712,6 +719,7 @@
":tint_common_config",
":tint_unittests_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -790,6 +798,7 @@
":tint_common_config",
":tint_unittests_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -833,6 +842,7 @@
":tint_common_config",
":tint_unittests_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -863,6 +873,7 @@
":tint_common_config",
":tint_unittests_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -887,6 +898,7 @@
":tint_common_config",
":tint_unittests_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -907,6 +919,7 @@
source_set("tint_wgsl_reader_fuzzer_src") {
sources = [ "fuzzers/tint_wgsl_reader_fuzzer.cc" ]
configs += [ ":tint_common_config" ]
+ public_configs = [ ":tint_public_config" ]
}
fuzzer_test("tint_wgsl_reader_fuzzer") {
@@ -949,6 +962,7 @@
":tint_common_config",
":tint_exe_config",
]
+ public_configs = [ ":tint_public_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]