blob: b0957d03eb141b1298f94490d8c42eecf6c930e9 [file] [log] [blame]
commit-bot@chromium.org2982a4f2014-01-21 19:48:47 +00001# Target for building freetype.
reed@google.comb76b34e2011-11-10 15:00:52 +00002{
reed@google.comb76b34e2011-11-10 15:00:52 +00003 'targets': [
4 {
borenet@google.com7158e6a2012-11-01 17:43:44 +00005 'target_name': 'freetype',
djsollen@google.com2679ff82013-07-22 14:12:56 +00006 'type': 'none',
7 'conditions': [
8 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
9 'direct_dependent_settings': {
10 'include_dirs' : [
11 '/usr/include/freetype2',
12 ],
13 'link_settings': {
14 'libraries': [
15 '-lfreetype',
16 ],
17 'defines': [
18 #The font host requires at least FreeType 2.3.0 at runtime.
19 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020300',\
20 'SK_CAN_USE_DLOPEN=1',
21 ],
22 }
23 },
24 }],
25 [ 'skia_os in ["android", "nacl"]', {
26 'dependencies': [
27 'freetype_static'
28 ],
29 'export_dependent_settings': [
30 'freetype_static'
31 ],
32 'direct_dependent_settings': {
33 'defines': [
34 # Both Android and NaCl provide at least FreeType 2.4.0
35 'SK_FONTHOST_FREETYPE_RUNTIME_VERSION=0x020400',
36 'SK_CAN_USE_DLOPEN=0',
37 ],
38 },
39 }],
40 ],
41 },
42 {
43 'target_name': 'freetype_static',
reed@google.comb76b34e2011-11-10 15:00:52 +000044 'type': 'static_library',
borenet@google.com5661c5b2013-02-27 14:12:55 +000045 'standalone_static_library': 1,
djsollen@google.com2e767c32013-07-23 12:22:11 +000046 'dependencies': [
47 # we are dependent upon PNG for color emoji glyphs
48 'images.gyp:images'
49 ],
commit-bot@chromium.org327c0812013-08-20 18:57:01 +000050 'includes': [
51 # common freetype sources needed for both the base Skia build and the
52 # libpoppler build for testing only
53 'freetype.gypi',
vandebo@chromium.org54c538e2013-08-20 17:06:22 +000054 ],
55 'include_dirs': [
56 '../third_party/freetype/include_overrides',
reed@google.comb76b34e2011-11-10 15:00:52 +000057 ],
58 'direct_dependent_settings': {
59 'include_dirs': [
djsollen@google.combcc6d7d2013-07-23 15:51:12 +000060 '../third_party/freetype/include_overrides',
reed@google.comb76b34e2011-11-10 15:00:52 +000061 ],
62 },
borenet@google.com7158e6a2012-11-01 17:43:44 +000063 'conditions': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000064 [ 'skia_os == "android"', {
65 # These flags are used by the Android OS. They are probably overkill
66 # for Skia, but we add them for consistency.
67 'cflags': [
68 '-W',
69 '-Wall',
70 '-fPIC',
71 '-DPIC',
72 '-DDARWIN_NO_CARBON',
73 '-DFT2_BUILD_LIBRARY',
74 '-O2',
75 ],
borenet@google.com7158e6a2012-11-01 17:43:44 +000076 }],
77 ],
reed@google.comb76b34e2011-11-10 15:00:52 +000078 },
commit-bot@chromium.org327c0812013-08-20 18:57:01 +000079 {
80 'target_name': 'freetype_poppler',
81 'type': 'static_library',
82 'standalone_static_library': 1,
83 'includes': [
84 'freetype.gypi',
85 ],
86 'sources': [
87 # additional components used by poppler
88 '../third_party/externals/freetype/src/base/ftbdf.c',
89 '../third_party/externals/freetype/src/base/ftpfr.c',
90
91 '../third_party/externals/freetype/src/bdf/bdf.c',
92 '../third_party/externals/freetype/src/cid/type1cid.c',
93 '../third_party/externals/freetype/src/pcf/pcf.c',
94 '../third_party/externals/freetype/src/pfr/pfr.c',
95 '../third_party/externals/freetype/src/psaux/psaux.c',
96 '../third_party/externals/freetype/src/type1/type1.c',
97 '../third_party/externals/freetype/src/type42/type42.c',
98 '../third_party/externals/freetype/src/winfonts/winfnt.c',
99
100 '../third_party/externals/freetype/src/gzip/ftgzip.c',
101 '../third_party/externals/freetype/src/lzw/ftlzw.c',
102 ],
103 },
reed@google.comb76b34e2011-11-10 15:00:52 +0000104 ],
105}