| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/chromecast_build.gni") | 5 import("//build/config/chromecast_build.gni") |
| 6 | 6 |
| 7 config("freetype_config") { | 7 config("freetype_config") { |
| 8 include_dirs = [ | 8 include_dirs = [ |
| 9 "include", | 9 "include", |
| 10 "src/include", | 10 "src/include", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 ] | 27 ] |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 | 30 |
| 31 component("freetype") { | 31 component("freetype") { |
| 32 if (is_linux) { | 32 if (is_linux) { |
| 33 output_name = "freetype" | 33 output_name = "freetype" |
| 34 output_extension = "so.6" | 34 output_extension = "so.6" |
| 35 } | 35 } |
| 36 | 36 |
| 37 defines = [] |
| 38 |
| 37 sources = [ | 39 sources = [ |
| 38 "include/freetype-custom-config/ftmodule.h", | 40 "include/freetype-custom-config/ftmodule.h", |
| 39 "include/freetype-custom-config/ftoption.h", | 41 "include/freetype-custom-config/ftoption.h", |
| 40 "src/src/autofit/autofit.c", | 42 "src/src/autofit/autofit.c", |
| 41 "src/src/base/ftbase.c", | 43 "src/src/base/ftbase.c", |
| 42 "src/src/base/ftbbox.c", | 44 "src/src/base/ftbbox.c", |
| 43 "src/src/base/ftbitmap.c", | 45 "src/src/base/ftbitmap.c", |
| 44 "src/src/base/ftfntfmt.c", | 46 "src/src/base/ftfntfmt.c", |
| 45 "src/src/base/ftfstype.c", | 47 "src/src/base/ftfstype.c", |
| 46 "src/src/base/ftgasp.c", | 48 "src/src/base/ftgasp.c", |
| 47 "src/src/base/ftglyph.c", | 49 "src/src/base/ftglyph.c", |
| 48 "src/src/base/ftinit.c", | 50 "src/src/base/ftinit.c", |
| 49 "src/src/base/ftlcdfil.c", | 51 "src/src/base/ftlcdfil.c", |
| 50 "src/src/base/ftmm.c", | 52 "src/src/base/ftmm.c", |
| 51 "src/src/base/ftstroke.c", | 53 "src/src/base/ftstroke.c", |
| 52 "src/src/base/ftsystem.c", | 54 "src/src/base/ftsystem.c", |
| 53 "src/src/base/fttype1.c", | 55 "src/src/base/fttype1.c", |
| 54 "src/src/cff/cff.c", | 56 "src/src/cff/cff.c", |
| 55 "src/src/cid/type1cid.c", | |
| 56 "src/src/gzip/ftgzip.c", | 57 "src/src/gzip/ftgzip.c", |
| 57 "src/src/psaux/psaux.c", | |
| 58 "src/src/pshinter/pshinter.c", | 58 "src/src/pshinter/pshinter.c", |
| 59 "src/src/psnames/psnames.c", | 59 "src/src/psnames/psnames.c", |
| 60 "src/src/raster/raster.c", | 60 "src/src/raster/raster.c", |
| 61 "src/src/sfnt/sfnt.c", | 61 "src/src/sfnt/sfnt.c", |
| 62 "src/src/smooth/smooth.c", | 62 "src/src/smooth/smooth.c", |
| 63 "src/src/truetype/truetype.c", | 63 "src/src/truetype/truetype.c", |
| 64 "src/src/type1/type1.c", | |
| 65 ] | 64 ] |
| 66 | 65 |
| 66 if (!is_android) { |
| 67 sources += [ |
| 68 "src/src/cid/type1cid.c", |
| 69 "src/src/psaux/psaux.c", |
| 70 "src/src/type1/type1.c", |
| 71 ] |
| 72 |
| 73 # Selects those three modules in freetype-custom-config/ftmodule.h. |
| 74 defines += [ "PDFIUM_REQUIRED_MODULES" ] |
| 75 } |
| 76 |
| 67 if (is_linux || is_chromecast) { | 77 if (is_linux || is_chromecast) { |
| 68 # Needed for content_shell on Linux and Chromecast, since fontconfig | 78 # Needed for content_shell on Linux and Chromecast, since fontconfig |
| 69 # requires FT_Get_BDF_Property. | 79 # requires FT_Get_BDF_Property. |
| 70 sources += [ "src/src/base/ftbdf.c" ] | 80 sources += [ "src/src/base/ftbdf.c" ] |
| 71 } | 81 } |
| 72 | 82 |
| 73 if (is_linux || is_chromecast) { | 83 if (is_linux || is_chromecast) { |
| 74 # Needed on Fedora whose libfreetype builds ftsynth.c containing | 84 # Needed on Fedora whose libfreetype builds ftsynth.c containing |
| 75 # FT_GlyphSlot_Embolden, which we need to replace in content_shell if | 85 # FT_GlyphSlot_Embolden, which we need to replace in content_shell if |
| 76 # we are linking against our own FreeType. | 86 # we are linking against our own FreeType. |
| 77 sources += [ "src/src/base/ftsynth.c" ] | 87 sources += [ "src/src/base/ftsynth.c" ] |
| 78 } | 88 } |
| 79 | 89 |
| 80 defines = [ | 90 defines += [ |
| 81 "FT2_BUILD_LIBRARY", | 91 "FT2_BUILD_LIBRARY", |
| 82 "DARWIN_NO_CARBON", | 92 "DARWIN_NO_CARBON", |
| 83 | 93 |
| 84 # Long directory name to avoid accidentally using wrong headers. | 94 # Long directory name to avoid accidentally using wrong headers. |
| 85 "FT_CONFIG_MODULES_H=<freetype-custom-config/ftmodule.h>", | 95 "FT_CONFIG_MODULES_H=<freetype-custom-config/ftmodule.h>", |
| 86 "FT_CONFIG_OPTIONS_H=<freetype-custom-config/ftoption.h>", | 96 "FT_CONFIG_OPTIONS_H=<freetype-custom-config/ftoption.h>", |
| 87 ] | 97 ] |
| 88 | 98 |
| 89 if (is_win && is_component_build) { | 99 if (is_win && is_component_build) { |
| 90 # Used for managing declspec(dllimport/export) visibility. | 100 # Used for managing declspec(dllimport/export) visibility. |
| 91 defines += [ "FT2_BUILD_DLL" ] | 101 defines += [ "FT2_BUILD_DLL" ] |
| 92 } | 102 } |
| 93 | 103 |
| 94 public_configs = [ ":freetype_config" ] | 104 public_configs = [ ":freetype_config" ] |
| 95 configs -= [ "//build/config/compiler:chromium_code" ] | 105 configs -= [ "//build/config/compiler:chromium_code" ] |
| 96 configs += [ "//build/config/compiler:no_chromium_code" ] | 106 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 97 | 107 |
| 98 configs += [ ":freetype-warnings" ] | 108 configs += [ ":freetype-warnings" ] |
| 99 | 109 |
| 100 deps = [ | 110 deps = [ |
| 101 "//third_party/libpng", | 111 "//third_party/libpng", |
| 102 "//third_party/zlib", | 112 "//third_party/zlib", |
| 103 ] | 113 ] |
| 104 } | 114 } |
| OLD | NEW |