blob: 91c92b7522e485af2c1261302691aa045cc2517b [file] [log] [blame]
reed@google.comb76b34e2011-11-10 15:00:52 +00001{
reed@google.comb76b34e2011-11-10 15:00:52 +00002 'targets': [
3 {
borenet@google.com7158e6a2012-11-01 17:43:44 +00004 'target_name': 'freetype',
djsollen@google.com2679ff82013-07-22 14:12:56 +00005 'type': 'none',
6 'conditions': [
7 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
8 'direct_dependent_settings': {
9 'include_dirs' : [
10 '/usr/include/freetype2',
11 ],
12 'link_settings': {
13 'libraries': [
14 '-lfreetype',
15 ],
16 'defines': [
17 #The font host requires at least FreeType 2.3.0 at runtime.
18 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\
19 'SK_CAN_USE_DLOPEN=1',
20 ],
21 }
22 },
23 }],
24 [ 'skia_os in ["android", "nacl"]', {
25 'dependencies': [
26 'freetype_static'
27 ],
28 'export_dependent_settings': [
29 'freetype_static'
30 ],
31 'direct_dependent_settings': {
32 'defines': [
33 # Both Android and NaCl provide at least FreeType 2.4.0
34 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',
35 'SK_CAN_USE_DLOPEN=0',
36 ],
37 },
38 }],
39 ],
40 },
41 {
42 'target_name': 'freetype_static',
reed@google.comb76b34e2011-11-10 15:00:52 +000043 'type': 'static_library',
borenet@google.com5661c5b2013-02-27 14:12:55 +000044 'standalone_static_library': 1,
djsollen@google.com2e767c32013-07-23 12:22:11 +000045 'dependencies': [
46 # we are dependent upon PNG for color emoji glyphs
47 'images.gyp:images'
48 ],
vandebo@chromium.org54c538e2013-08-20 17:06:22 +000049 'sources': [
50 # base components (required)
51 '../third_party/externals/freetype/src/base/ftsystem.c',
52 '../third_party/externals/freetype/src/base/ftinit.c',
53 '../third_party/externals/freetype/src/base/ftdebug.c',
54 '../third_party/externals/freetype/src/base/ftbase.c',
55
56 '../third_party/externals/freetype/src/base/ftbbox.c', # recommended, see <freetype/ftbbox.h>
57 '../third_party/externals/freetype/src/base/ftglyph.c', # recommended, see <freetype/ftglyph.h>
58
59 '../third_party/externals/freetype/src/base/ftbitmap.c', # optional, see <freetype/ftbitmap.h>
60 '../third_party/externals/freetype/src/base/ftfstype.c', # optional
61 '../third_party/externals/freetype/src/base/ftgasp.c', # optional, see <freetype/ftgasp.h>
62 '../third_party/externals/freetype/src/base/ftlcdfil.c', # optional, see <freetype/ftlcdfil.h>
63 '../third_party/externals/freetype/src/base/ftmm.c', # optional, see <freetype/ftmm.h>
64 '../third_party/externals/freetype/src/base/ftpatent.c', # optional
65 '../third_party/externals/freetype/src/base/ftstroke.c', # optional, see <freetype/ftstroke.h>
66 '../third_party/externals/freetype/src/base/ftsynth.c', # optional, see <freetype/ftsynth.h>
67 '../third_party/externals/freetype/src/base/fttype1.c', # optional, see <freetype/t1tables.h>
68 '../third_party/externals/freetype/src/base/ftwinfnt.c', # optional, see <freetype/ftwinfnt.h>
69 '../third_party/externals/freetype/src/base/ftxf86.c', # optional, see <freetype/ftxf86.h>
70
71 # font drivers (optional; at least one is needed)
72 '../third_party/externals/freetype/src/cff/cff.c', # CFF/OpenType font driver
73 '../third_party/externals/freetype/src/sfnt/sfnt.c', # SFNT files support (TrueType & OpenType)
74 '../third_party/externals/freetype/src/truetype/truetype.c', # TrueType font driver
75
76 # rasterizers (optional; at least one is needed for vector formats)
77 '../third_party/externals/freetype/src/raster/raster.c', # monochrome rasterizer
78 '../third_party/externals/freetype/src/smooth/smooth.c', # anti-aliasing rasterizer
79
80 # auxiliary modules (optional)
81 '../third_party/externals/freetype/src/autofit/autofit.c', # auto hinting module
82 '../third_party/externals/freetype/src/pshinter/pshinter.c', # PS hinting module
83 '../third_party/externals/freetype/src/psnames/psnames.c', # PostScript glyph names support
84 ],
85 'include_dirs': [
86 '../third_party/freetype/include_overrides',
87 '../third_party/externals/freetype/internal',
88 '../third_party/externals/freetype/builds',
89 '../third_party/externals/freetype/include',
90 '../third_party/externals/freetype',
91 ],
92 'cflags': [
93 '-DFT2_BUILD_LIBRARY',
reed@google.comb76b34e2011-11-10 15:00:52 +000094 ],
95 'direct_dependent_settings': {
96 'include_dirs': [
djsollen@google.combcc6d7d2013-07-23 15:51:12 +000097 '../third_party/freetype/include_overrides',
vandebo@chromium.org54c538e2013-08-20 17:06:22 +000098 '../third_party/externals/freetype/include',
reed@google.comb76b34e2011-11-10 15:00:52 +000099 ],
100 },
borenet@google.com7158e6a2012-11-01 17:43:44 +0000101 'conditions': [
vandebo@chromium.org54c538e2013-08-20 17:06:22 +0000102 [ 'skia_warnings_as_errors', {
103 'cflags!': [
104 '-Werror',
105 ],
106 }],
107 [ 'skia_os == "mac"', {
108 'sources': [
109 '../third_party/externals/freetype/src/base/ftmac.c', # only on the Macintosh
110 ],
111 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000112 [ 'skia_os == "android"', {
113 # These flags are used by the Android OS. They are probably overkill
114 # for Skia, but we add them for consistency.
115 'cflags': [
116 '-W',
117 '-Wall',
118 '-fPIC',
119 '-DPIC',
120 '-DDARWIN_NO_CARBON',
121 '-DFT2_BUILD_LIBRARY',
122 '-O2',
123 ],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000124 }],
125 ],
reed@google.comb76b34e2011-11-10 15:00:52 +0000126 },
reed@google.comb76b34e2011-11-10 15:00:52 +0000127 ],
128}
129
130# Local Variables:
131# tab-width:2
132# indent-tabs-mode:nil
133# End:
134# vim: set expandtab tabstop=2 shiftwidth=2: