OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 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 { | |
6 'includes': [ | |
7 '../../build/win_precompile.gypi', | |
8 ], | |
9 'variables': { | |
10 # Blink uses a cutting-edge version of Harfbuzz; most Linux distros do not | |
11 # contain a new enough version of the code to work correctly. However, | |
12 # ChromeOS chroots (i.e, real ChromeOS builds for devices) do contain a | |
13 # new enough version of the library, and so this variable exists so that | |
14 # ChromeOS can build against the system lib and keep binary sizes smaller. | |
15 'use_system_harfbuzz%': 0, | |
16 }, | |
17 'conditions': [ | |
18 ['use_system_harfbuzz==0', { | |
19 'targets': [ | |
20 { | |
21 'target_name': 'harfbuzz-ng', | |
22 'type': 'static_library', | |
23 'defines': [ | |
24 'HAVE_OT', | |
25 'HAVE_ICU', | |
26 'HAVE_ICU_BUILTIN', | |
27 'HB_NO_MT', | |
28 ], | |
29 'sources': [ | |
30 'src/hb-atomic-private.hh', | |
31 'src/hb-blob.cc', | |
32 'src/hb-blob.h', | |
33 'src/hb-buffer.cc', | |
34 'src/hb-buffer-deserialize-json.hh', | |
35 'src/hb-buffer-deserialize-text.hh', | |
36 'src/hb-buffer.h', | |
37 'src/hb-buffer-private.hh', | |
38 'src/hb-buffer-serialize.cc', | |
39 'src/hb-cache-private.hh', | |
40 'src/hb-common.cc', | |
41 'src/hb-common.h', | |
42 'src/hb-deprecated.h', | |
43 'src/hb-face.cc', | |
44 'src/hb-face.h', | |
45 'src/hb-face-private.hh', | |
46 'src/hb-fallback-shape.cc', | |
47 'src/hb-font.cc', | |
48 'src/hb-font.h', | |
49 'src/hb-font-private.hh', | |
50 'src/hb.h', | |
51 'src/hb-icu.cc', | |
52 'src/hb-icu.h', | |
53 'src/hb-mutex-private.hh', | |
54 'src/hb-object-private.hh', | |
55 'src/hb-open-file-private.hh', | |
56 'src/hb-open-type-private.hh', | |
57 'src/hb-ot.h', | |
58 'src/hb-ot-font.cc', | |
59 'src/hb-ot-font.h', | |
60 'src/hb-ot-head-table.hh', | |
61 'src/hb-ot-hhea-table.hh', | |
62 'src/hb-ot-hmtx-table.hh', | |
63 'src/hb-ot-layout.cc', | |
64 'src/hb-ot-layout-common-private.hh', | |
65 'src/hb-ot-layout-gdef-table.hh', | |
66 'src/hb-ot-layout-gpos-table.hh', | |
67 'src/hb-ot-layout-gsubgpos-private.hh', | |
68 'src/hb-ot-layout-gsub-table.hh', | |
69 'src/hb-ot-layout.h', | |
70 'src/hb-ot-layout-private.hh', | |
71 'src/hb-ot-map.cc', | |
72 'src/hb-ot-map-private.hh', | |
73 'src/hb-ot-maxp-table.hh', | |
74 'src/hb-ot-name-table.hh', | |
75 'src/hb-ot-post-table.hh', | |
76 'src/hb-ot-shape.cc', | |
77 'src/hb-ot-shape-complex-arabic.cc', | |
78 'src/hb-ot-shape-complex-arabic-fallback.hh', | |
79 'src/hb-ot-shape-complex-arabic-private.hh', | |
80 'src/hb-ot-shape-complex-arabic-table.hh', | |
81 'src/hb-ot-shape-complex-default.cc', | |
82 'src/hb-ot-shape-complex-hangul.cc', | |
83 'src/hb-ot-shape-complex-hebrew.cc', | |
84 'src/hb-ot-shape-complex-indic.cc', | |
85 'src/hb-ot-shape-complex-indic-machine.hh', | |
86 'src/hb-ot-shape-complex-indic-private.hh', | |
87 'src/hb-ot-shape-complex-indic-table.cc', | |
88 'src/hb-ot-shape-complex-myanmar.cc', | |
89 'src/hb-ot-shape-complex-myanmar-machine.hh', | |
90 'src/hb-ot-shape-complex-private.hh', | |
91 'src/hb-ot-shape-complex-thai.cc', | |
92 'src/hb-ot-shape-complex-tibetan.cc', | |
93 'src/hb-ot-shape-complex-use.cc', | |
94 'src/hb-ot-shape-complex-use-machine.hh', | |
95 'src/hb-ot-shape-complex-use-private.hh', | |
96 'src/hb-ot-shape-complex-use-table.cc', | |
97 'src/hb-ot-shape-fallback.cc', | |
98 'src/hb-ot-shape-fallback-private.hh', | |
99 'src/hb-ot-shape.h', | |
100 'src/hb-ot-shape-normalize.cc', | |
101 'src/hb-ot-shape-normalize-private.hh', | |
102 'src/hb-ot-shape-private.hh', | |
103 'src/hb-ot-tag.cc', | |
104 'src/hb-ot-tag.h', | |
105 'src/hb-private.hh', | |
106 'src/hb-set.cc', | |
107 'src/hb-set.h', | |
108 'src/hb-set-private.hh', | |
109 'src/hb-shape.cc', | |
110 'src/hb-shape.h', | |
111 'src/hb-shape-plan.cc', | |
112 'src/hb-shape-plan.h', | |
113 'src/hb-shape-plan-private.hh', | |
114 'src/hb-shaper.cc', | |
115 'src/hb-shaper-impl-private.hh', | |
116 'src/hb-shaper-list.hh', | |
117 'src/hb-shaper-private.hh', | |
118 'src/hb-unicode.cc', | |
119 'src/hb-unicode.h', | |
120 'src/hb-unicode-private.hh', | |
121 'src/hb-utf-private.hh', | |
122 'src/hb-version.h', | |
123 'src/hb-warning.cc', | |
124 ], | |
125 'include_dirs': [ | |
126 'src', | |
127 ], | |
128 'direct_dependent_settings': { | |
129 'include_dirs': [ | |
130 'src', | |
131 ], | |
132 }, | |
133 'dependencies': [ | |
134 '../../third_party/icu/icu.gyp:icuuc', | |
135 ], | |
136 'variables': { | |
137 'clang_warning_flags': [ | |
138 '-Wno-unused-value', | |
139 # Harfbuzz uses unused typedefs for its static asserts (and its | |
140 # static asserts are strange enough that they can't be replaced | |
141 # by static_assert). | |
142 '-Wno-unused-local-typedef', | |
143 ], | |
144 }, | |
145 'conditions': [ | |
146 ['OS=="win"', { | |
147 # TODO(eae): C4267 on amd64. size_t -> int, size_t -> unsigned int | |
148 'msvs_disabled_warnings': [4267, 4334], | |
149 }], | |
150 ['OS=="mac"', { | |
151 'defines': [ | |
152 'HAVE_CORETEXT', | |
153 ], | |
154 'sources': [ | |
155 'src/hb-coretext.cc', | |
156 'src/hb-coretext.h', | |
157 ], | |
158 }], | |
159 # When without -fvisibility=hidden for pango to use the harfbuzz | |
160 # in the tree, all symbols pango needs must be included, or | |
161 # pango uses mixed versions of harfbuzz and leads to crash. | |
162 # See crbug.com/462689. | |
163 ['use_pango==1 and OS=="linux" and chromeos==0 and buildtype!="Offic
ial" and target_arch!="arm" and target_arch!="mipsel"', { | |
164 'cflags!': ['-fvisibility=hidden'], | |
165 'sources': [ | |
166 'src/hb-ft.cc', | |
167 'src/hb-ft.h', | |
168 'src/hb-glib.cc', | |
169 'src/hb-glib.h', | |
170 ], | |
171 'link_settings': { | |
172 'ldflags': [ | |
173 # These symbols are referenced from libpangoft2, which will be | |
174 # dynamically linked later. | |
175 '-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs', | |
176 ], | |
177 }, | |
178 'dependencies': [ | |
179 '../../build/linux/system.gyp:freetype2', | |
180 '../../build/linux/system.gyp:glib', | |
181 ], | |
182 }], | |
183 ], | |
184 }, | |
185 ], | |
186 }, { # use_system_harfbuzz==1 | |
187 'targets': [ | |
188 { | |
189 'target_name': 'harfbuzz-ng', | |
190 'type': 'none', | |
191 'cflags': [ | |
192 '<!@(<(pkg-config) --cflags harfbuzz)', | |
193 ], | |
194 'direct_dependent_settings': { | |
195 'cflags': [ | |
196 '<!@(<(pkg-config) --cflags harfbuzz)', | |
197 ], | |
198 }, | |
199 'link_settings': { | |
200 'ldflags': [ | |
201 '<!@(<(pkg-config) --libs-only-L --libs-only-other harfbuzz)', | |
202 ], | |
203 'libraries': [ | |
204 '<!@(<(pkg-config) --libs-only-l harfbuzz)', | |
205 ], | |
206 }, | |
207 }, | |
208 ], | |
209 }], | |
210 ], | |
211 } | |
OLD | NEW |