GN: fold :vulkan into :gpu.
Obviously, :vulkan can't be used without :gpu, but more subtly,
:gpu needs to see SK_VULKAN defined if we're using Vulkan.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2352923003
NOTREECHECKS=true
Review-Url: https://codereview.chromium.org/2352923003
diff --git a/BUILD.gn b/BUILD.gn
index d9f7d79..4e78a1c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -303,6 +303,8 @@
optional("gpu") {
enabled = skia_enable_gpu
+ public_defines = []
+
sources = skia_gpu_sources + [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ]
# These paths need to be absolute to match the ones produced by shared_sources.gni.
@@ -320,6 +322,13 @@
} else {
sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ]
}
+ libs = []
+
+ if (skia_use_vulkan) {
+ public_defines += [ "SK_VULKAN" ]
+ sources += skia_vk_sources
+ libs += [ "vulkan" ]
+ }
}
optional("jpeg") {
@@ -379,13 +388,6 @@
]
}
-optional("vulkan") {
- enabled = skia_use_vulkan
- public_defines = [ "SK_VULKAN" ]
- libs = [ "vulkan" ]
- sources = skia_vk_sources
-}
-
optional("webp") {
enabled = skia_use_libwebp
public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
@@ -438,7 +440,6 @@
":sse42",
":ssse3",
":typeface_freetype",
- ":vulkan",
":webp",
":xml",
]