Fix compilation of the OpenGL backend on Mac
OpenGLBackend.cpp would end up including KHR/khrplatform.h when the
libdawn_native target that contains it doesn't have a dependency on the
khr_platform target. Fix this by making libdawn_native_sources expose
some of its dependencies as public_deps.
BUG=
Change-Id: I45c05a064e4b73ab7ac6f5f6258e7983e5fc085d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9205
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 3f443c0..8245a6a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -95,6 +95,11 @@
configs += [ ":libdawn_native_internal" ]
libs = []
+ # Dependencies that are needed to compile libdawn_native entry points in
+ # FooBackend.cpp need to be public deps so they are propagated to the
+ # libdawn_native target
+ public_deps = []
+
sources = get_target_outputs(":libdawn_native_utils_gen")
sources += [
"src/dawn_native/Adapter.cpp",
@@ -280,7 +285,7 @@
}
if (dawn_enable_opengl) {
- deps += [
+ public_deps += [
":libdawn_native_opengl_loader_gen",
"third_party:khronos_platform",
]
@@ -326,7 +331,7 @@
}
if (dawn_enable_vulkan) {
- deps += [ "third_party:vulkan_headers" ]
+ public_deps += [ "third_party:vulkan_headers" ]
sources += [
"src/dawn_native/vulkan/AdapterVk.cpp",
"src/dawn_native/vulkan/AdapterVk.h",