Fix Fuchsia build with Skia enabled Update skia/BUILD.gn to include a font manager for Fuchsia. Bug: pdfium:2018,pdfium:2019 Change-Id: Ia2fbdd6e83532ccea2729906f5d4ae356627b3cc Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105858 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nigi <nigi@chromium.org>
diff --git a/skia/BUILD.gn b/skia/BUILD.gn index 8e6c27a..ff91366 100644 --- a/skia/BUILD.gn +++ b/skia/BUILD.gn
@@ -161,6 +161,8 @@ } component("skia") { + deps = [] + sources = [ # PDFium sources. "config/SkPdfiumUserConfig.h", @@ -297,6 +299,24 @@ ] } + if (is_fuchsia) { + sources += [ + # TODO(crbug.com/pdfium/2019): Consider using SkFontMgr_fuchsia.cpp + # instead of SkFontMgr_custom_empty.cpp. + "//third_party/skia/src/ports/SkFontMgr_custom.cpp", + "//third_party/skia/src/ports/SkFontMgr_custom_empty.cpp", + "//third_party/skia/src/ports/SkFontMgr_custom_empty_factory.cpp", + ] + deps += [ + "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.fonts:fuchsia.fonts_hlcpp", + "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.io:fuchsia.io_hlcpp", + "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.sys:fuchsia.sys_hlcpp", + "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp", + "//third_party/fuchsia-sdk/sdk/pkg/zx", + "//third_party/icu:icuuc", + ] + } + if (is_clang && !is_nacl) { # Skia won't compile with some of the more strict clang warnings. # e.g. it does: @@ -312,7 +332,7 @@ ] public_configs = [ ":skia_config" ] - deps = [ + deps += [ ":skcms", ":skia_opts", "../third_party:png",