blob: 6717c78f65ca01c8e066357771c11b8199cd6e9b [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 }],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000040 [ 'skia_android_framework', {
41 'include_dirs': [
42 'external/expat/lib',
43 'external/freetype/include',
44 ],
45 'libraries': [
46 '-lft2',
47 ],
48 # Remove these, and use the system's freetype instead.
49 'dependencies!': [
50 'freetype_static',
51 ],
52 'export_dependent_settings!': [
53 'freetype_static',
54 ]
55 }],
djsollen@google.com2679ff82013-07-22 14:12:56 +000056 ],
57 },
58 {
59 'target_name': 'freetype_static',
reed@google.comb76b34e2011-11-10 15:00:52 +000060 'type': 'static_library',
borenet@google.com5661c5b2013-02-27 14:12:55 +000061 'standalone_static_library': 1,
djsollen@google.com2e767c32013-07-23 12:22:11 +000062 'dependencies': [
63 # we are dependent upon PNG for color emoji glyphs
64 'images.gyp:images'
65 ],
commit-bot@chromium.org327c0812013-08-20 18:57:01 +000066 'includes': [
67 # common freetype sources needed for both the base Skia build and the
68 # libpoppler build for testing only
69 'freetype.gypi',
vandebo@chromium.org54c538e2013-08-20 17:06:22 +000070 ],
71 'include_dirs': [
72 '../third_party/freetype/include_overrides',
reed@google.comb76b34e2011-11-10 15:00:52 +000073 ],
74 'direct_dependent_settings': {
75 'include_dirs': [
djsollen@google.combcc6d7d2013-07-23 15:51:12 +000076 '../third_party/freetype/include_overrides',
reed@google.comb76b34e2011-11-10 15:00:52 +000077 ],
78 },
borenet@google.com7158e6a2012-11-01 17:43:44 +000079 'conditions': [
borenet@google.com7158e6a2012-11-01 17:43:44 +000080 [ 'skia_os == "android"', {
81 # These flags are used by the Android OS. They are probably overkill
82 # for Skia, but we add them for consistency.
83 'cflags': [
84 '-W',
85 '-Wall',
86 '-fPIC',
87 '-DPIC',
88 '-DDARWIN_NO_CARBON',
89 '-DFT2_BUILD_LIBRARY',
90 '-O2',
91 ],
borenet@google.com7158e6a2012-11-01 17:43:44 +000092 }],
93 ],
reed@google.comb76b34e2011-11-10 15:00:52 +000094 },
commit-bot@chromium.org327c0812013-08-20 18:57:01 +000095 {
96 'target_name': 'freetype_poppler',
97 'type': 'static_library',
98 'standalone_static_library': 1,
99 'includes': [
100 'freetype.gypi',
101 ],
102 'sources': [
103 # additional components used by poppler
104 '../third_party/externals/freetype/src/base/ftbdf.c',
105 '../third_party/externals/freetype/src/base/ftpfr.c',
106
107 '../third_party/externals/freetype/src/bdf/bdf.c',
108 '../third_party/externals/freetype/src/cid/type1cid.c',
109 '../third_party/externals/freetype/src/pcf/pcf.c',
110 '../third_party/externals/freetype/src/pfr/pfr.c',
111 '../third_party/externals/freetype/src/psaux/psaux.c',
112 '../third_party/externals/freetype/src/type1/type1.c',
113 '../third_party/externals/freetype/src/type42/type42.c',
114 '../third_party/externals/freetype/src/winfonts/winfnt.c',
115
116 '../third_party/externals/freetype/src/gzip/ftgzip.c',
117 '../third_party/externals/freetype/src/lzw/ftlzw.c',
118 ],
119 },
reed@google.comb76b34e2011-11-10 15:00:52 +0000120 ],
121}