OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 import("//build/config/chromecast_build.gni") | |
6 | |
7 config("freetype_config") { | |
8 include_dirs = [ | |
9 "include", | |
10 "src/include", | |
11 ] | |
12 } | |
13 | |
14 config("freetype-warnings") { | |
15 cflags = [] | |
16 | |
17 # The reduction of FreeType files to a minimum triggers -Wunused-function | |
18 # warnings in ftbase.c | |
19 cflags += [ "-Wno-unused-function" ] | |
20 } | |
21 | |
22 config("freetype-visibility") { | |
23 cflags = [] | |
24 cflags += [ "-fvisibility=default" ] | |
25 } | |
26 | |
27 component("freetype") { | |
28 if (is_linux) { | |
29 output_name = "freetype" | |
30 output_extension = "so.6" | |
31 } | |
32 | |
33 sources = [ | |
34 "src/src/autofit/autofit.c", | |
35 "src/src/base/ftbase.c", | |
36 "src/src/base/ftbbox.c", | |
37 "src/src/base/ftbitmap.c", | |
38 "src/src/base/ftfntfmt.c", | |
39 "src/src/base/ftfstype.c", | |
40 "src/src/base/ftgasp.c", | |
41 "src/src/base/ftglyph.c", | |
42 "src/src/base/ftinit.c", | |
43 "src/src/base/ftlcdfil.c", | |
44 "src/src/base/ftmm.c", | |
45 "src/src/base/ftstroke.c", | |
46 "src/src/base/ftsystem.c", | |
47 "src/src/base/fttype1.c", | |
48 "src/src/cff/cff.c", | |
49 "src/src/gzip/ftgzip.c", | |
50 "src/src/pshinter/pshinter.c", | |
51 "src/src/psnames/psnames.c", | |
52 "src/src/raster/raster.c", | |
53 "src/src/sfnt/sfnt.c", | |
54 "src/src/smooth/smooth.c", | |
55 "src/src/truetype/truetype.c", | |
56 ] | |
57 | |
58 if (is_linux || is_chromecast) { | |
59 # Needed for content_shell on Linux and Chromecast, since fontconfig require
s FT_Get_BDF_Property. | |
60 sources += [ "src/src/base/ftbdf.c" ] | |
61 } | |
62 | |
63 defines = [ | |
64 "FT2_BUILD_LIBRARY", | |
65 "DARWIN_NO_CARBON", | |
66 | |
67 # Long directory name to avoid accidentally using wrong headers. | |
68 "FT_CONFIG_MODULES_H=<freetype-android-config/ftmodule.h>", | |
69 "FT_CONFIG_OPTIONS_H=<freetype-android-config/ftoption.h>", | |
70 ] | |
71 | |
72 public_configs = [ ":freetype_config" ] | |
73 configs -= [ "//build/config/compiler:chromium_code" ] | |
74 configs += [ | |
75 "//build/config/compiler:no_chromium_code", | |
76 ":freetype-warnings", | |
77 ":freetype-visibility" | |
78 ] | |
79 | |
80 deps = [ | |
81 "//third_party/libpng", | |
82 "//third_party/zlib", | |
83 ] | |
84 } | |
OLD | NEW |