Chromium Code Reviews| Index: third_party/freetype-android/BUILD.gn |
| diff --git a/third_party/freetype-android/BUILD.gn b/third_party/freetype-android/BUILD.gn |
| index acca85a5c719d8d72dac6882179605cee16e0166..c8828e9908249ab71715ef2e01d5349cdae4b1b4 100644 |
| --- a/third_party/freetype-android/BUILD.gn |
| +++ b/third_party/freetype-android/BUILD.gn |
| @@ -3,9 +3,6 @@ |
| # found in the LICENSE file. |
| import("//build/config/chromecast_build.gni") |
| - |
| -assert(is_android || is_chromecast, |
| - "This library is only used on Android or Chromecast") |
| config("freetype_config") { |
| include_dirs = [ |
| @@ -14,10 +11,23 @@ |
| ] |
| } |
| -source_set("freetype") { |
| +config("freetype-warnings") { |
| + cflags = [] |
| + |
| + # The reduction of FreeType files to a minimum triggers -Wunused-function |
| + # warnings in ftbase.c |
| + cflags += [ "-Wno-unused-function" ] |
| +} |
| + |
| +config("freetype-visibility") { |
| + cflags = [] |
| + cflags += [ "-fvisibility=default" ] |
| +} |
| + |
| +component("freetype") { |
| + output_name = "freetype" |
|
bungeman-skia
2017/03/01 22:02:56
Isn't there supposed to be an 'if' here?
|
| + output_extension = "so.6" |
| sources = [ |
| - # The following files are not sorted alphabetically, but in the |
| - # same order as in Android.mk to ease maintenance. |
| "src/src/autofit/autofit.c", |
| "src/src/base/ftbase.c", |
| "src/src/base/ftbbox.c", |
| @@ -42,7 +52,8 @@ |
| "src/src/truetype/truetype.c", |
| ] |
| - if (is_chromecast) { |
| + if (is_linux || is_chromecast) { |
| + # Needed for content_shell on Linux and Chromecast, since fontconfig requires FT_Get_BDF_Property. |
| sources += [ "src/src/base/ftbdf.c" ] |
| } |
| @@ -57,7 +68,11 @@ |
| public_configs = [ ":freetype_config" ] |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| - configs += [ "//build/config/compiler:no_chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":freetype-warnings", |
| + ":freetype-visibility" |
| + ] |
| deps = [ |
| "//third_party/libpng", |