Fixes for Android GN build input/outputs
[chromium-blink-merge.git] / third_party / harfbuzz-ng / harfbuzz.gyp
blobf381e743f9893966730b5196605ef7e1a29b114e
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.
6   'includes': [
7     '../../build/win_precompile.gypi',
8   ],
9   'variables': {
10     'conditions': [
11       ['OS=="linux" and (buildtype!="Official" or chromeos==1) and embedded==0', {
12         # Since version 1.31.0, pangoft2 which we depend on pulls in harfbuzz
13         # anyways. However, we want to have control of the version of harfbuzz
14         # we use, so don't use system harfbuzz for official builds, unless we
15         # are building for chrome os, where we have the system harfbuzz under
16         # control as well.
17         'use_system_harfbuzz%': '<!(python ../../build/check_return_value.py <(pkg-config) --atleast-version=1.31.0 pangoft2)',
18       }, {
19         'use_system_harfbuzz': 0,
20       }],
21     ],
22   },
23   'conditions': [
24     ['use_system_harfbuzz==0', {
25       'targets': [
26         {
27           'target_name': 'harfbuzz-ng',
28           'type': 'static_library',
29           'defines': [
30             'HAVE_OT',
31             'HAVE_ICU',
32             'HAVE_ICU_BUILTIN',
33             'HB_NO_MT',
34           ],
35           'sources': [
36             'src/hb-atomic-private.hh',
37             'src/hb-blob.cc',
38             'src/hb-blob.h',
39             'src/hb-buffer.cc',
40             'src/hb-buffer-deserialize-json.hh',
41             'src/hb-buffer-deserialize-text.hh',
42             'src/hb-buffer.h',
43             'src/hb-buffer-private.hh',
44             'src/hb-buffer-serialize.cc',
45             'src/hb-cache-private.hh',
46             'src/hb-common.cc',
47             'src/hb-common.h',
48             'src/hb-deprecated.h',
49             'src/hb-face.cc',
50             'src/hb-face.h',
51             'src/hb-face-private.hh',
52             'src/hb-fallback-shape.cc',
53             'src/hb-font.cc',
54             'src/hb-font.h',
55             'src/hb-font-private.hh',
56             'src/hb.h',
57             'src/hb-icu.cc',
58             'src/hb-icu.h',
59             'src/hb-mutex-private.hh',
60             'src/hb-object-private.hh',
61             'src/hb-open-file-private.hh',
62             'src/hb-open-type-private.hh',
63             'src/hb-ot.h',
64             'src/hb-ot-font.cc',
65             'src/hb-ot-font.h',
66             'src/hb-ot-head-table.hh',
67             'src/hb-ot-hhea-table.hh',
68             'src/hb-ot-hmtx-table.hh',
69             'src/hb-ot-layout.cc',
70             'src/hb-ot-layout-common-private.hh',
71             'src/hb-ot-layout-gdef-table.hh',
72             'src/hb-ot-layout-gpos-table.hh',
73             'src/hb-ot-layout-gsubgpos-private.hh',
74             'src/hb-ot-layout-gsub-table.hh',
75             'src/hb-ot-layout.h',
76             'src/hb-ot-layout-private.hh',
77             'src/hb-ot-map.cc',
78             'src/hb-ot-map-private.hh',
79             'src/hb-ot-maxp-table.hh',
80             'src/hb-ot-name-table.hh',
81             'src/hb-ot-shape.cc',
82             'src/hb-ot-shape-complex-arabic.cc',
83             'src/hb-ot-shape-complex-arabic-fallback.hh',
84             'src/hb-ot-shape-complex-arabic-table.hh',
85             'src/hb-ot-shape-complex-default.cc',
86             'src/hb-ot-shape-complex-hangul.cc',
87             'src/hb-ot-shape-complex-hebrew.cc',
88             'src/hb-ot-shape-complex-indic.cc',
89             'src/hb-ot-shape-complex-indic-machine.hh',
90             'src/hb-ot-shape-complex-indic-private.hh',
91             'src/hb-ot-shape-complex-indic-table.cc',
92             'src/hb-ot-shape-complex-myanmar.cc',
93             'src/hb-ot-shape-complex-myanmar-machine.hh',
94             'src/hb-ot-shape-complex-private.hh',
95             'src/hb-ot-shape-complex-sea.cc',
96             'src/hb-ot-shape-complex-sea-machine.hh',
97             'src/hb-ot-shape-complex-thai.cc',
98             'src/hb-ot-shape-complex-tibetan.cc',
99             'src/hb-ot-shape-fallback.cc',
100             'src/hb-ot-shape-fallback-private.hh',
101             'src/hb-ot-shape.h',
102             'src/hb-ot-shape-normalize.cc',
103             'src/hb-ot-shape-normalize-private.hh',
104             'src/hb-ot-shape-private.hh',
105             'src/hb-ot-tag.cc',
106             'src/hb-ot-tag.h',
107             'src/hb-private.hh',
108             'src/hb-set.cc',
109             'src/hb-set.h',
110             'src/hb-set-private.hh',
111             'src/hb-shape.cc',
112             'src/hb-shape.h',
113             'src/hb-shape-plan.cc',
114             'src/hb-shape-plan.h',
115             'src/hb-shape-plan-private.hh',
116             'src/hb-shaper.cc',
117             'src/hb-shaper-impl-private.hh',
118             'src/hb-shaper-list.hh',
119             'src/hb-shaper-private.hh',
120             'src/hb-unicode.cc',
121             'src/hb-unicode.h',
122             'src/hb-unicode-private.hh',
123             'src/hb-utf-private.hh',
124             'src/hb-version.h',
125             'src/hb-warning.cc',
126           ],
127           'include_dirs': [
128             'src',
129           ],
130           'direct_dependent_settings': {
131             'include_dirs': [
132               'src',
133             ],
134           },
135           'dependencies': [
136             '../../third_party/icu/icu.gyp:icuuc',
137           ],
138           'variables': {
139             'clang_warning_flags': [ '-Wno-unused-value', ],
140           },
141           'conditions': [
142             ['OS=="win"', {
143               # TODO(eae): C4267 on amd64. size_t -> int, size_t -> unsigned int
144               'msvs_disabled_warnings': [4267, 4334],
145             }],
146             ['OS=="mac"', {
147               'defines': [
148                 'HAVE_CORETEXT',
149               ],
150               'sources': [
151                 'src/hb-coretext.cc',
152                 'src/hb-coretext.h',
153               ],
154             }],
155           ],
156         },
157       ],
158     }, {  # use_system_harfbuzz==1
159       'targets': [
160         {
161           'target_name': 'harfbuzz-ng',
162           'type': 'none',
163           'cflags': [
164             '<!@(<(pkg-config) --cflags harfbuzz)',
165           ],
166           'direct_dependent_settings': {
167             'cflags': [
168               '<!@(<(pkg-config) --cflags harfbuzz)',
169             ],
170           },
171           'link_settings': {
172             'ldflags': [
173               '<!@(<(pkg-config) --libs-only-L --libs-only-other harfbuzz)',
174             ],
175             'libraries': [
176               '<!@(<(pkg-config) --libs-only-l harfbuzz)',
177             ],
178           },
179         },
180       ],
181     }],
182   ],