| 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
|
| @@ -4,9 +4,6 @@
|
|
|
| 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 = [
|
| "include",
|
| @@ -14,10 +11,23 @@ config("freetype_config") {
|
| ]
|
| }
|
|
|
| -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"
|
| + 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 @@ source_set("freetype") {
|
| "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 @@ source_set("freetype") {
|
|
|
| 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",
|
|
|