blob: 91fc0b3db690d3979b6e7e03282c518649e8cf9b [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,
reed@google.comb76b34e2011-11-10 15:00:52 +000045 'sources': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000046 # base components (required)
47 '../third_party/externals/freetype/src/base/ftsystem.c',
48 '../third_party/externals/freetype/src/base/ftinit.c',
49 '../third_party/externals/freetype/src/base/ftdebug.c',
50 '../third_party/externals/freetype/src/base/ftbase.c',
reed@google.comb76b34e2011-11-10 15:00:52 +000051
borenet@google.com7158e6a2012-11-01 17:43:44 +000052 '../third_party/externals/freetype/src/base/ftbbox.c', # recommended, see <freetype/ftbbox.h>
53 '../third_party/externals/freetype/src/base/ftglyph.c', # recommended, see <freetype/ftglyph.h>
54
55 '../third_party/externals/freetype/src/base/ftbitmap.c', # optional, see <freetype/ftbitmap.h>
56 '../third_party/externals/freetype/src/base/ftfstype.c', # optional
57 '../third_party/externals/freetype/src/base/ftgasp.c', # optional, see <freetype/ftgasp.h>
58 '../third_party/externals/freetype/src/base/ftlcdfil.c', # optional, see <freetype/ftlcdfil.h>
59 '../third_party/externals/freetype/src/base/ftmm.c', # optional, see <freetype/ftmm.h>
60 '../third_party/externals/freetype/src/base/ftpatent.c', # optional
61 '../third_party/externals/freetype/src/base/ftstroke.c', # optional, see <freetype/ftstroke.h>
62 '../third_party/externals/freetype/src/base/ftsynth.c', # optional, see <freetype/ftsynth.h>
63 '../third_party/externals/freetype/src/base/fttype1.c', # optional, see <freetype/t1tables.h>
64 '../third_party/externals/freetype/src/base/ftwinfnt.c', # optional, see <freetype/ftwinfnt.h>
65 '../third_party/externals/freetype/src/base/ftxf86.c', # optional, see <freetype/ftxf86.h>
66
67 # font drivers (optional; at least one is needed)
68 '../third_party/externals/freetype/src/cff/cff.c', # CFF/OpenType font driver
69 '../third_party/externals/freetype/src/sfnt/sfnt.c', # SFNT files support (TrueType & OpenType)
70 '../third_party/externals/freetype/src/truetype/truetype.c', # TrueType font driver
71
72 # rasterizers (optional; at least one is needed for vector formats)
73 '../third_party/externals/freetype/src/raster/raster.c', # monochrome rasterizer
74 '../third_party/externals/freetype/src/smooth/smooth.c', # anti-aliasing rasterizer
75
76 # auxiliary modules (optional)
77 '../third_party/externals/freetype/src/autofit/autofit.c', # auto hinting module
78 '../third_party/externals/freetype/src/psaux/psaux.c', # PostScript Type 1 parsing
79 '../third_party/externals/freetype/src/pshinter/pshinter.c', # PS hinting module
80 '../third_party/externals/freetype/src/psnames/psnames.c', # PostScript glyph names support
reed@google.comb76b34e2011-11-10 15:00:52 +000081 ],
82 'include_dirs': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000083 '../third_party/externals/freetype/internal',
84 '../third_party/externals/freetype/builds',
85 '../third_party/externals/freetype/include',
86 '../third_party/externals/freetype',
reed@google.comb76b34e2011-11-10 15:00:52 +000087 ],
88 'cflags': [
reed@google.comb76b34e2011-11-10 15:00:52 +000089 '-DFT2_BUILD_LIBRARY',
90 ],
91 'direct_dependent_settings': {
92 'include_dirs': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000093 '../third_party/externals/freetype/include',
reed@google.comb76b34e2011-11-10 15:00:52 +000094 ],
95 },
borenet@google.com7158e6a2012-11-01 17:43:44 +000096 'conditions': [
97 [ 'skia_os == "mac"', {
98 'sources': [
99 '../third_party/externals/freetype/src/base/ftmac.c', # only on the Macintosh
100 ],
101 }],
102 [ 'skia_os == "android"', {
103 # These flags are used by the Android OS. They are probably overkill
104 # for Skia, but we add them for consistency.
105 'cflags': [
106 '-W',
107 '-Wall',
108 '-fPIC',
109 '-DPIC',
110 '-DDARWIN_NO_CARBON',
111 '-DFT2_BUILD_LIBRARY',
112 '-O2',
113 ],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000114 }],
115 ],
reed@google.comb76b34e2011-11-10 15:00:52 +0000116 },
117 ],
118}
119
120# Local Variables:
121# tab-width:2
122# indent-tabs-mode:nil
123# End:
124# vim: set expandtab tabstop=2 shiftwidth=2: