This repository has been archived by the owner on Apr 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
harfbuzz.cmake
230 lines (217 loc) · 8.63 KB
/
harfbuzz.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
### --- harfbuzz ---###
if(TARGET_EMSCRIPTEN)
# skip
elseif(TARGET_LINUX OR TARGET_WINDOWS)
# skip
else()
# NOTE: harfbuzz from skia on WINDOWS
message(FATAL_ERROR "platform not supported")
endif()
# see https://github.com/google/skia/blob/81abc43e6f0b1a789e1bf116820c8ede68d778ab/third_party/harfbuzz/BUILD.gn
set(harfbuzz_SOURCES
${harfbuzz_FULL_DIR}src/hb-aat-fdsc-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-layout-ankr-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-layout-bsln-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-layout-feat-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-layout-kerx-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-layout-morx-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-layout-trak-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-layout.cc
${harfbuzz_FULL_DIR}src/hb-aat-ltag-table.hh
${harfbuzz_FULL_DIR}src/hb-aat-map.cc
${harfbuzz_FULL_DIR}src/hb-aat-map.hh
${harfbuzz_FULL_DIR}src/hb-array.hh
${harfbuzz_FULL_DIR}src/hb-atomic.hh
${harfbuzz_FULL_DIR}src/hb-blob.cc
${harfbuzz_FULL_DIR}src/hb-blob.h
${harfbuzz_FULL_DIR}src/hb-blob.hh
${harfbuzz_FULL_DIR}src/hb-buffer-deserialize-json.hh
${harfbuzz_FULL_DIR}src/hb-buffer-deserialize-text.hh
${harfbuzz_FULL_DIR}src/hb-buffer-serialize.cc
${harfbuzz_FULL_DIR}src/hb-buffer.cc
${harfbuzz_FULL_DIR}src/hb-buffer.h
${harfbuzz_FULL_DIR}src/hb-buffer.hh
${harfbuzz_FULL_DIR}src/hb-cache.hh
${harfbuzz_FULL_DIR}src/hb-cff-interp-common.hh
${harfbuzz_FULL_DIR}src/hb-cff-interp-cs-common.hh
${harfbuzz_FULL_DIR}src/hb-cff-interp-dict-common.hh
${harfbuzz_FULL_DIR}src/hb-cff1-interp-cs.hh
${harfbuzz_FULL_DIR}src/hb-cff2-interp-cs.hh
${harfbuzz_FULL_DIR}src/hb-common.cc
${harfbuzz_FULL_DIR}src/hb-common.h
${harfbuzz_FULL_DIR}src/hb-debug.hh
${harfbuzz_FULL_DIR}src/hb-deprecated.h
${harfbuzz_FULL_DIR}src/hb-dsalgs.hh
${harfbuzz_FULL_DIR}src/hb-face.cc
${harfbuzz_FULL_DIR}src/hb-face.h
${harfbuzz_FULL_DIR}src/hb-face.hh
${harfbuzz_FULL_DIR}src/hb-font.cc
${harfbuzz_FULL_DIR}src/hb-font.h
${harfbuzz_FULL_DIR}src/hb-font.hh
${harfbuzz_FULL_DIR}src/hb-icu.cc
${harfbuzz_FULL_DIR}src/hb-icu.h
${harfbuzz_FULL_DIR}src/hb-map.cc
${harfbuzz_FULL_DIR}src/hb-mutex.hh
${harfbuzz_FULL_DIR}src/hb-object.hh
${harfbuzz_FULL_DIR}src/hb-open-file.hh
${harfbuzz_FULL_DIR}src/hb-open-type.hh
${harfbuzz_FULL_DIR}src/hb-ot-cff-common.hh
${harfbuzz_FULL_DIR}src/hb-ot-cff1-table.cc
${harfbuzz_FULL_DIR}src/hb-ot-cff1-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-cff2-table.cc
${harfbuzz_FULL_DIR}src/hb-ot-cff2-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-color-cbdt-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-color-colr-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-color-cpal-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-deprecated.h
${harfbuzz_FULL_DIR}src/hb-ot-face.cc
${harfbuzz_FULL_DIR}src/hb-ot-face.hh
${harfbuzz_FULL_DIR}src/hb-ot-font.cc
${harfbuzz_FULL_DIR}src/hb-ot-font.h
${harfbuzz_FULL_DIR}src/hb-ot-gasp-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-hdmx-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-head-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-hhea-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-hmtx-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-kern-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-layout-base-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-layout-common.hh
${harfbuzz_FULL_DIR}src/hb-ot-layout-gdef-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-layout-gpos-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-layout-gsub-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-layout-gsubgpos.hh
${harfbuzz_FULL_DIR}src/hb-ot-layout.cc
${harfbuzz_FULL_DIR}src/hb-ot-layout.h
${harfbuzz_FULL_DIR}src/hb-ot-layout.hh
${harfbuzz_FULL_DIR}src/hb-ot-map.cc
${harfbuzz_FULL_DIR}src/hb-ot-map.hh
${harfbuzz_FULL_DIR}src/hb-ot-math-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-math.cc
${harfbuzz_FULL_DIR}src/hb-ot-math.h
${harfbuzz_FULL_DIR}src/hb-ot-maxp-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-name-language.cc
${harfbuzz_FULL_DIR}src/hb-ot-name-language.hh
${harfbuzz_FULL_DIR}src/hb-ot-name-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-name.cc
${harfbuzz_FULL_DIR}src/hb-ot-os2-unicode-ranges.hh
${harfbuzz_FULL_DIR}src/hb-ot-post-macroman.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-arabic-fallback.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-arabic-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-arabic.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-arabic.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-default.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-hangul.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-hebrew.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-indic-machine.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-indic-table.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-indic.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-indic.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-khmer-machine.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-khmer.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-khmer.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-myanmar-machine.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-myanmar.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-myanmar.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-thai.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-use-machine.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-use-table.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-use.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-use.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-vowel-constraints.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex-vowel-constraints.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-complex.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-fallback.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-fallback.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape-normalize.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape-normalize.hh
${harfbuzz_FULL_DIR}src/hb-ot-shape.cc
${harfbuzz_FULL_DIR}src/hb-ot-shape.h
${harfbuzz_FULL_DIR}src/hb-ot-shape.hh
${harfbuzz_FULL_DIR}src/hb-ot-tag.cc
${harfbuzz_FULL_DIR}src/hb-ot-var-avar-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-var-fvar-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-var-hvar-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-var-mvar-table.hh
${harfbuzz_FULL_DIR}src/hb-ot-var.cc
${harfbuzz_FULL_DIR}src/hb-ot-var.h
${harfbuzz_FULL_DIR}src/hb-ot.h
${harfbuzz_FULL_DIR}src/hb-set-digest.hh
${harfbuzz_FULL_DIR}src/hb-set.cc
${harfbuzz_FULL_DIR}src/hb-set.h
${harfbuzz_FULL_DIR}src/hb-set.hh
${harfbuzz_FULL_DIR}src/hb-shape-plan.cc
${harfbuzz_FULL_DIR}src/hb-shape-plan.h
${harfbuzz_FULL_DIR}src/hb-shape-plan.hh
${harfbuzz_FULL_DIR}src/hb-shape.cc
${harfbuzz_FULL_DIR}src/hb-shape.h
${harfbuzz_FULL_DIR}src/hb-shaper-impl.hh
${harfbuzz_FULL_DIR}src/hb-shaper-list.hh
${harfbuzz_FULL_DIR}src/hb-shaper.cc
${harfbuzz_FULL_DIR}src/hb-shaper.hh
${harfbuzz_FULL_DIR}src/hb-static.cc
${harfbuzz_FULL_DIR}src/hb-string-array.hh
${harfbuzz_FULL_DIR}src/hb-subset-cff-common.cc
${harfbuzz_FULL_DIR}src/hb-subset-cff-common.hh
${harfbuzz_FULL_DIR}src/hb-subset-cff1.cc
${harfbuzz_FULL_DIR}src/hb-subset-cff2.cc
${harfbuzz_FULL_DIR}src/hb-subset-glyf.cc
${harfbuzz_FULL_DIR}src/hb-subset-glyf.hh
${harfbuzz_FULL_DIR}src/hb-subset-input.cc
${harfbuzz_FULL_DIR}src/hb-subset-plan.cc
${harfbuzz_FULL_DIR}src/hb-subset-plan.hh
${harfbuzz_FULL_DIR}src/hb-subset.cc
${harfbuzz_FULL_DIR}src/hb-subset.h
${harfbuzz_FULL_DIR}src/hb-subset.hh
${harfbuzz_FULL_DIR}src/hb-unicode-emoji-table.hh
${harfbuzz_FULL_DIR}src/hb-unicode.cc
${harfbuzz_FULL_DIR}src/hb-unicode.h
${harfbuzz_FULL_DIR}src/hb-unicode.hh
${harfbuzz_FULL_DIR}src/hb-utf.hh
${harfbuzz_FULL_DIR}src/hb-version.h
${harfbuzz_FULL_DIR}src/hb-warning.cc
${harfbuzz_FULL_DIR}src/hb.h
${harfbuzz_FULL_DIR}src/hb.hh
#
#if (is_mac) {
# sources += [ "../externals/harfbuzz/src/hb-coretext.cc" ]
# defines += [ "HAVE_CORETEXT" ]
#}
)
add_library(harfbuzz STATIC
${harfbuzz_SOURCES}
)
set_property(TARGET harfbuzz PROPERTY CXX_STANDARD 17)
# In your source, include files from base/ like normal.
# So if you want to use the string printf API, do:
# #include <base/stringprintf.h>
target_include_directories(harfbuzz PUBLIC
${harfbuzz_FULL_DIR}
${harfbuzz_FULL_DIR}src
)
#target_include_directories(harfbuzz PRIVATE
#)
if(NOT DEFINED CUSTOM_ICU_LIB)
message(FATAL_ERROR "CUSTOM_ICU_LIB must be defined")
endif(NOT DEFINED CUSTOM_ICU_LIB)
target_link_libraries(harfbuzz PUBLIC
${CUSTOM_ICU_LIB}
)
# http://userguide.harfbuzz-project.org/howtouseharfbuzz#TOC-C-With-Your-Own-Build-System
list(APPEND harfbuzz_PUBLIC_DEFINES
HAVE_ICU=1
HAVE_ICU_BUILTIN=1
HAVE_OT=1
)
list(APPEND harfbuzz_PRIVATE_DEFINES
# TODO(https://crbug.com/949962): Remove once this is fixed upstream.
#U_DISABLE_VERSION_SUFFIX=1
)
target_compile_definitions(harfbuzz PUBLIC
${harfbuzz_PUBLIC_DEFINES}
)
target_compile_definitions(harfbuzz PRIVATE
${harfbuzz_PRIVATE_DEFINES}
)
target_compile_options(harfbuzz PRIVATE
-Wno-error
)