From 4b0671ab3e795bbb5e6aaf6305cae3171d73d241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= Date: Thu, 30 Mar 2017 11:07:43 +0300 Subject: Allow configuration of external embedder FreeType Add a public config to fxfreetype to make includes visible and provide a freetype_common group as a public dependency on fxcrt. freetype_common switches between fxfreetype and //build/config/freetype, which gives embedders the flexibility to configure the source of FreeType. BUG=chromium:700926 Change-Id: I73ae26979dcf69a419485def23c7a13dffa2a15d Reviewed-on: https://pdfium-review.googlesource.com/2971 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang --- third_party/BUILD.gn | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'third_party') diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index 2055821f8e..a24e99e7f0 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -46,12 +46,19 @@ config("fx_freetype_warnings") { # # ttgload.c casts from unsigned int to unsigned long to void*. cflags = [ - "-Wno-unused-function", - "-Wno-int-to-void-pointer-cast", + "-Wno-unused-function", + "-Wno-int-to-void-pointer-cast", ] } } +config("freetype_public_includes_config") { + include_dirs = [ + "freetype/include", + "freetype/src/include", + ] +} + # Tests may link against this even if the production library doesn't, # so it needs to be separate from it. static_library("fx_freetype") { @@ -63,6 +70,9 @@ static_library("fx_freetype") { # Must be after no_chromium_code for warning flags to be ordered correctly. ":fx_freetype_warnings", ] + + public_configs = [ ":freetype_public_includes_config" ] + defines = [ "FT2_BUILD_LIBRARY" ] sources = [ "freetype/include/freetype/config/ftconfig.h", -- cgit v1.2.3