| 1 |
|
| 2 |
from misc.utility.scons_hints import * |
| 3 |
|
| 4 |
import text_server_adv_builders |
| 5 |
|
| 6 |
Import("env") |
| 7 |
Import("env_modules") |
| 8 |
|
| 9 |
env_text_server_adv = env_modules.Clone() |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
thirdparty_obj = [] |
| 14 |
freetype_enabled = "freetype" in env.module_list |
| 15 |
msdfgen_enabled = "msdfgen" in env.module_list |
| 16 |
|
| 17 |
if "svg" in env.module_list: |
| 18 |
env_text_server_adv.Prepend( |
| 19 |
CPPPATH=[ |
| 20 |
"#thirdparty/thorvg/inc", |
| 21 |
"#thirdparty/thorvg/src/common", |
| 22 |
"#thirdparty/thorvg/src/renderer", |
| 23 |
] |
| 24 |
) |
| 25 |
|
| 26 |
env_text_server_adv.Append(CPPDEFINES=["TVG_STATIC"]) |
| 27 |
|
| 28 |
if env["builtin_icu4c"]: |
| 29 |
env_text_server_adv.Append(CPPDEFINES=["HAVE_ICU_BUILTIN"]) |
| 30 |
|
| 31 |
if env["builtin_harfbuzz"]: |
| 32 |
env_harfbuzz = env_modules.Clone() |
| 33 |
env_harfbuzz.disable_warnings() |
| 34 |
|
| 35 |
thirdparty_dir = "#thirdparty/harfbuzz/" |
| 36 |
thirdparty_sources = [ |
| 37 |
"src/hb-aat-layout.cc", |
| 38 |
"src/hb-aat-map.cc", |
| 39 |
"src/hb-blob.cc", |
| 40 |
"src/hb-buffer-serialize.cc", |
| 41 |
"src/hb-buffer-verify.cc", |
| 42 |
"src/hb-buffer.cc", |
| 43 |
|
| 44 |
|
| 45 |
"src/hb-common.cc", |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
"src/hb-draw.cc", |
| 50 |
"src/hb-face-builder.cc", |
| 51 |
"src/hb-face.cc", |
| 52 |
"src/hb-fallback-shape.cc", |
| 53 |
"src/hb-font.cc", |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
"src/hb-icu.cc", |
| 58 |
|
| 59 |
"src/hb-map.cc", |
| 60 |
"src/hb-number.cc", |
| 61 |
"src/hb-ot-cff1-table.cc", |
| 62 |
"src/hb-ot-cff2-table.cc", |
| 63 |
"src/hb-ot-color.cc", |
| 64 |
"src/hb-ot-face.cc", |
| 65 |
"src/hb-ot-font.cc", |
| 66 |
"src/hb-ot-layout.cc", |
| 67 |
"src/hb-ot-map.cc", |
| 68 |
"src/hb-ot-math.cc", |
| 69 |
"src/hb-ot-meta.cc", |
| 70 |
"src/hb-ot-metrics.cc", |
| 71 |
"src/hb-ot-name.cc", |
| 72 |
"src/hb-ot-shaper-arabic.cc", |
| 73 |
"src/hb-ot-shaper-default.cc", |
| 74 |
"src/hb-ot-shaper-hangul.cc", |
| 75 |
"src/hb-ot-shaper-hebrew.cc", |
| 76 |
"src/hb-ot-shaper-indic-table.cc", |
| 77 |
"src/hb-ot-shaper-indic.cc", |
| 78 |
"src/hb-ot-shaper-khmer.cc", |
| 79 |
"src/hb-ot-shaper-myanmar.cc", |
| 80 |
"src/hb-ot-shaper-syllabic.cc", |
| 81 |
"src/hb-ot-shaper-thai.cc", |
| 82 |
"src/hb-ot-shaper-use.cc", |
| 83 |
"src/hb-ot-shaper-vowel-constraints.cc", |
| 84 |
"src/hb-ot-shape-fallback.cc", |
| 85 |
"src/hb-ot-shape-normalize.cc", |
| 86 |
"src/hb-ot-shape.cc", |
| 87 |
"src/hb-ot-tag.cc", |
| 88 |
"src/hb-ot-var.cc", |
| 89 |
"src/hb-outline.cc", |
| 90 |
"src/hb-paint-bounded.cc", |
| 91 |
"src/hb-paint-extents.cc", |
| 92 |
"src/hb-paint.cc", |
| 93 |
"src/hb-set.cc", |
| 94 |
"src/hb-shape-plan.cc", |
| 95 |
"src/hb-shape.cc", |
| 96 |
"src/hb-shaper.cc", |
| 97 |
"src/hb-static.cc", |
| 98 |
"src/hb-style.cc", |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
"src/hb-subset.cc", |
| 113 |
"src/hb-ucd.cc", |
| 114 |
"src/hb-unicode.cc", |
| 115 |
|
| 116 |
"src/OT/Var/VARC/VARC.cc", |
| 117 |
] |
| 118 |
|
| 119 |
if freetype_enabled: |
| 120 |
thirdparty_sources += [ |
| 121 |
"src/hb-ft.cc", |
| 122 |
] |
| 123 |
if env["graphite"]: |
| 124 |
thirdparty_sources += [ |
| 125 |
"src/hb-graphite2.cc", |
| 126 |
] |
| 127 |
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] |
| 128 |
|
| 129 |
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"]) |
| 130 |
|
| 131 |
env_harfbuzz.Append(CPPDEFINES=["HAVE_ICU"]) |
| 132 |
if env["builtin_icu4c"]: |
| 133 |
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"]) |
| 134 |
env_harfbuzz.Append( |
| 135 |
CPPDEFINES=[ |
| 136 |
"U_STATIC_IMPLEMENTATION", |
| 137 |
("U_HAVE_LIB_SUFFIX", 1), |
| 138 |
("U_LIB_SUFFIX_C_NAME", "_godot"), |
| 139 |
"HAVE_ICU_BUILTIN", |
| 140 |
] |
| 141 |
) |
| 142 |
|
| 143 |
if freetype_enabled: |
| 144 |
env_harfbuzz.Append(CPPDEFINES=["HAVE_FREETYPE"]) |
| 145 |
if env["graphite"]: |
| 146 |
env_harfbuzz.Append(CPPDEFINES=["HAVE_GRAPHITE2"]) |
| 147 |
if env["builtin_freetype"]: |
| 148 |
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/freetype/include"]) |
| 149 |
if env["builtin_graphite"] and env["graphite"]: |
| 150 |
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/graphite/include"]) |
| 151 |
env_harfbuzz.Append(CPPDEFINES=["GRAPHITE2_STATIC"]) |
| 152 |
if env["platform"] in ["android", "linuxbsd", "web"]: |
| 153 |
env_harfbuzz.Append(CPPDEFINES=["HAVE_PTHREAD"]) |
| 154 |
|
| 155 |
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"]) |
| 156 |
|
| 157 |
lib = env_harfbuzz.add_library("harfbuzz_builtin", thirdparty_sources) |
| 158 |
thirdparty_obj += lib |
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
inserted = False |
| 165 |
for idx, linklib in enumerate(env["LIBS"]): |
| 166 |
if isinstance(linklib, (str, bytes)): |
| 167 |
env["LIBS"].insert(idx, lib) |
| 168 |
inserted = True |
| 169 |
break |
| 170 |
if not inserted: |
| 171 |
env.Append(LIBS=[lib]) |
| 172 |
|
| 173 |
|
| 174 |
if env["builtin_graphite"] and freetype_enabled and env["graphite"]: |
| 175 |
env_graphite = env_modules.Clone() |
| 176 |
env_graphite.disable_warnings() |
| 177 |
|
| 178 |
thirdparty_dir = "#thirdparty/graphite/" |
| 179 |
thirdparty_sources = [ |
| 180 |
"src/gr_char_info.cpp", |
| 181 |
"src/gr_face.cpp", |
| 182 |
"src/gr_features.cpp", |
| 183 |
"src/gr_font.cpp", |
| 184 |
"src/gr_logging.cpp", |
| 185 |
"src/gr_segment.cpp", |
| 186 |
"src/gr_slot.cpp", |
| 187 |
"src/CmapCache.cpp", |
| 188 |
"src/Code.cpp", |
| 189 |
"src/Collider.cpp", |
| 190 |
"src/Decompressor.cpp", |
| 191 |
"src/Face.cpp", |
| 192 |
|
| 193 |
"src/FeatureMap.cpp", |
| 194 |
"src/Font.cpp", |
| 195 |
"src/GlyphCache.cpp", |
| 196 |
"src/GlyphFace.cpp", |
| 197 |
"src/Intervals.cpp", |
| 198 |
"src/Justifier.cpp", |
| 199 |
"src/NameTable.cpp", |
| 200 |
"src/Pass.cpp", |
| 201 |
"src/Position.cpp", |
| 202 |
"src/Segment.cpp", |
| 203 |
"src/Silf.cpp", |
| 204 |
"src/Slot.cpp", |
| 205 |
"src/Sparse.cpp", |
| 206 |
"src/TtfUtil.cpp", |
| 207 |
"src/UtfCodec.cpp", |
| 208 |
"src/FileFace.cpp", |
| 209 |
"src/json.cpp", |
| 210 |
] |
| 211 |
if not env_graphite.msvc: |
| 212 |
thirdparty_sources += ["src/direct_machine.cpp"] |
| 213 |
else: |
| 214 |
thirdparty_sources += ["src/call_machine.cpp"] |
| 215 |
|
| 216 |
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] |
| 217 |
|
| 218 |
env_graphite.Prepend(CPPPATH=["#thirdparty/graphite/src", "#thirdparty/graphite/include"]) |
| 219 |
env_graphite.Append( |
| 220 |
CPPDEFINES=[ |
| 221 |
"GRAPHITE2_STATIC", |
| 222 |
"GRAPHITE2_NTRACING", |
| 223 |
"GRAPHITE2_NFILEFACE", |
| 224 |
] |
| 225 |
) |
| 226 |
|
| 227 |
lib = env_graphite.add_library("graphite_builtin", thirdparty_sources) |
| 228 |
thirdparty_obj += lib |
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
inserted = False |
| 235 |
for idx, linklib in enumerate(env["LIBS"]): |
| 236 |
if isinstance(linklib, (str, bytes)): |
| 237 |
env["LIBS"].insert(idx, lib) |
| 238 |
inserted = True |
| 239 |
break |
| 240 |
if not inserted: |
| 241 |
env.Append(LIBS=[lib]) |
| 242 |
|
| 243 |
|
| 244 |
if env["builtin_icu4c"]: |
| 245 |
env_icu = env_modules.Clone() |
| 246 |
env_icu.disable_warnings() |
| 247 |
|
| 248 |
thirdparty_dir = "#thirdparty/icu4c/" |
| 249 |
thirdparty_sources = [ |
| 250 |
"common/appendable.cpp", |
| 251 |
"common/bmpset.cpp", |
| 252 |
"common/brkeng.cpp", |
| 253 |
"common/brkiter.cpp", |
| 254 |
"common/bytesinkutil.cpp", |
| 255 |
"common/bytestream.cpp", |
| 256 |
"common/bytestrie.cpp", |
| 257 |
"common/bytestriebuilder.cpp", |
| 258 |
"common/bytestrieiterator.cpp", |
| 259 |
"common/caniter.cpp", |
| 260 |
"common/characterproperties.cpp", |
| 261 |
"common/chariter.cpp", |
| 262 |
"common/charstr.cpp", |
| 263 |
"common/cmemory.cpp", |
| 264 |
"common/cstr.cpp", |
| 265 |
"common/cstring.cpp", |
| 266 |
"common/cwchar.cpp", |
| 267 |
"common/dictbe.cpp", |
| 268 |
"common/dictionarydata.cpp", |
| 269 |
"common/dtintrv.cpp", |
| 270 |
"common/edits.cpp", |
| 271 |
"common/emojiprops.cpp", |
| 272 |
"common/errorcode.cpp", |
| 273 |
"common/filteredbrk.cpp", |
| 274 |
"common/filterednormalizer2.cpp", |
| 275 |
"common/fixedstring.cpp", |
| 276 |
"common/icudataver.cpp", |
| 277 |
"common/icuplug.cpp", |
| 278 |
"common/loadednormalizer2impl.cpp", |
| 279 |
"common/localebuilder.cpp", |
| 280 |
"common/localematcher.cpp", |
| 281 |
"common/localeprioritylist.cpp", |
| 282 |
"common/locavailable.cpp", |
| 283 |
"common/locbased.cpp", |
| 284 |
"common/locdispnames.cpp", |
| 285 |
"common/locdistance.cpp", |
| 286 |
"common/locdspnm.cpp", |
| 287 |
"common/locid.cpp", |
| 288 |
"common/loclikely.cpp", |
| 289 |
"common/loclikelysubtags.cpp", |
| 290 |
"common/locmap.cpp", |
| 291 |
"common/locresdata.cpp", |
| 292 |
"common/locutil.cpp", |
| 293 |
"common/lsr.cpp", |
| 294 |
"common/lstmbe.cpp", |
| 295 |
"common/messagepattern.cpp", |
| 296 |
"common/mlbe.cpp", |
| 297 |
"common/normalizer2.cpp", |
| 298 |
"common/normalizer2impl.cpp", |
| 299 |
"common/normlzr.cpp", |
| 300 |
"common/parsepos.cpp", |
| 301 |
"common/patternprops.cpp", |
| 302 |
"common/pluralmap.cpp", |
| 303 |
"common/propname.cpp", |
| 304 |
"common/propsvec.cpp", |
| 305 |
"common/punycode.cpp", |
| 306 |
"common/putil.cpp", |
| 307 |
"common/rbbi.cpp", |
| 308 |
"common/rbbi_cache.cpp", |
| 309 |
"common/rbbidata.cpp", |
| 310 |
"common/rbbinode.cpp", |
| 311 |
"common/rbbirb.cpp", |
| 312 |
"common/rbbiscan.cpp", |
| 313 |
"common/rbbisetb.cpp", |
| 314 |
"common/rbbistbl.cpp", |
| 315 |
"common/rbbitblb.cpp", |
| 316 |
"common/resbund.cpp", |
| 317 |
"common/resbund_cnv.cpp", |
| 318 |
"common/resource.cpp", |
| 319 |
"common/restrace.cpp", |
| 320 |
"common/ruleiter.cpp", |
| 321 |
"common/schriter.cpp", |
| 322 |
"common/serv.cpp", |
| 323 |
"common/servlk.cpp", |
| 324 |
"common/servlkf.cpp", |
| 325 |
"common/servls.cpp", |
| 326 |
"common/servnotf.cpp", |
| 327 |
"common/servrbf.cpp", |
| 328 |
"common/servslkf.cpp", |
| 329 |
"common/sharedobject.cpp", |
| 330 |
"common/simpleformatter.cpp", |
| 331 |
"common/static_unicode_sets.cpp", |
| 332 |
"common/stringpiece.cpp", |
| 333 |
"common/stringtriebuilder.cpp", |
| 334 |
"common/uarrsort.cpp", |
| 335 |
"common/ubidi.cpp", |
| 336 |
"common/ubidi_props.cpp", |
| 337 |
"common/ubidiln.cpp", |
| 338 |
"common/ubiditransform.cpp", |
| 339 |
"common/ubidiwrt.cpp", |
| 340 |
"common/ubrk.cpp", |
| 341 |
"common/ucase.cpp", |
| 342 |
"common/ucasemap.cpp", |
| 343 |
"common/ucasemap_titlecase_brkiter.cpp", |
| 344 |
"common/ucat.cpp", |
| 345 |
"common/uchar.cpp", |
| 346 |
"common/ucharstrie.cpp", |
| 347 |
"common/ucharstriebuilder.cpp", |
| 348 |
"common/ucharstrieiterator.cpp", |
| 349 |
"common/uchriter.cpp", |
| 350 |
"common/ucln_cmn.cpp", |
| 351 |
"common/ucmndata.cpp", |
| 352 |
"common/ucnv.cpp", |
| 353 |
"common/ucnv2022.cpp", |
| 354 |
"common/ucnv_bld.cpp", |
| 355 |
"common/ucnv_cb.cpp", |
| 356 |
"common/ucnv_cnv.cpp", |
| 357 |
"common/ucnv_ct.cpp", |
| 358 |
"common/ucnv_err.cpp", |
| 359 |
"common/ucnv_ext.cpp", |
| 360 |
"common/ucnv_io.cpp", |
| 361 |
"common/ucnv_lmb.cpp", |
| 362 |
"common/ucnv_set.cpp", |
| 363 |
"common/ucnv_u16.cpp", |
| 364 |
"common/ucnv_u32.cpp", |
| 365 |
"common/ucnv_u7.cpp", |
| 366 |
"common/ucnv_u8.cpp", |
| 367 |
"common/ucnvbocu.cpp", |
| 368 |
"common/ucnvdisp.cpp", |
| 369 |
"common/ucnvhz.cpp", |
| 370 |
"common/ucnvisci.cpp", |
| 371 |
"common/ucnvlat1.cpp", |
| 372 |
"common/ucnvmbcs.cpp", |
| 373 |
"common/ucnvscsu.cpp", |
| 374 |
"common/ucnvsel.cpp", |
| 375 |
"common/ucol_swp.cpp", |
| 376 |
"common/ucptrie.cpp", |
| 377 |
"common/ucurr.cpp", |
| 378 |
"common/udata.cpp", |
| 379 |
"common/udatamem.cpp", |
| 380 |
"common/udataswp.cpp", |
| 381 |
"common/uenum.cpp", |
| 382 |
"common/uhash.cpp", |
| 383 |
"common/uhash_us.cpp", |
| 384 |
"common/uidna.cpp", |
| 385 |
"common/uinit.cpp", |
| 386 |
"common/uinvchar.cpp", |
| 387 |
"common/uiter.cpp", |
| 388 |
"common/ulist.cpp", |
| 389 |
"common/uloc.cpp", |
| 390 |
"common/uloc_keytype.cpp", |
| 391 |
"common/uloc_tag.cpp", |
| 392 |
"common/ulocale.cpp", |
| 393 |
"common/ulocbuilder.cpp", |
| 394 |
"common/umapfile.cpp", |
| 395 |
"common/umath.cpp", |
| 396 |
"common/umutablecptrie.cpp", |
| 397 |
"common/umutex.cpp", |
| 398 |
"common/unames.cpp", |
| 399 |
"common/unifiedcache.cpp", |
| 400 |
"common/unifilt.cpp", |
| 401 |
"common/unifunct.cpp", |
| 402 |
"common/uniset.cpp", |
| 403 |
"common/uniset_closure.cpp", |
| 404 |
"common/uniset_props.cpp", |
| 405 |
"common/unisetspan.cpp", |
| 406 |
"common/unistr.cpp", |
| 407 |
"common/unistr_case.cpp", |
| 408 |
"common/unistr_case_locale.cpp", |
| 409 |
"common/unistr_cnv.cpp", |
| 410 |
"common/unistr_props.cpp", |
| 411 |
"common/unistr_titlecase_brkiter.cpp", |
| 412 |
"common/unorm.cpp", |
| 413 |
"common/unormcmp.cpp", |
| 414 |
"common/uobject.cpp", |
| 415 |
"common/uprops.cpp", |
| 416 |
"common/ures_cnv.cpp", |
| 417 |
"common/uresbund.cpp", |
| 418 |
"common/uresdata.cpp", |
| 419 |
"common/usc_impl.cpp", |
| 420 |
"common/uscript.cpp", |
| 421 |
"common/uscript_props.cpp", |
| 422 |
"common/uset.cpp", |
| 423 |
"common/uset_props.cpp", |
| 424 |
"common/usetiter.cpp", |
| 425 |
|
| 426 |
"common/usprep.cpp", |
| 427 |
"common/ustack.cpp", |
| 428 |
"common/ustr_cnv.cpp", |
| 429 |
"common/ustr_titlecase_brkiter.cpp", |
| 430 |
"common/ustr_wcs.cpp", |
| 431 |
"common/ustrcase.cpp", |
| 432 |
"common/ustrcase_locale.cpp", |
| 433 |
"common/ustrenum.cpp", |
| 434 |
"common/ustrfmt.cpp", |
| 435 |
"common/ustring.cpp", |
| 436 |
"common/ustrtrns.cpp", |
| 437 |
"common/utext.cpp", |
| 438 |
"common/utf_impl.cpp", |
| 439 |
"common/util.cpp", |
| 440 |
"common/util_props.cpp", |
| 441 |
"common/utrace.cpp", |
| 442 |
"common/utrie.cpp", |
| 443 |
"common/utrie2.cpp", |
| 444 |
"common/utrie2_builder.cpp", |
| 445 |
"common/utrie_swap.cpp", |
| 446 |
"common/uts46.cpp", |
| 447 |
"common/utypes.cpp", |
| 448 |
"common/uvector.cpp", |
| 449 |
"common/uvectr32.cpp", |
| 450 |
"common/uvectr64.cpp", |
| 451 |
"common/wintz.cpp", |
| 452 |
"i18n/scriptset.cpp", |
| 453 |
"i18n/ucln_in.cpp", |
| 454 |
"i18n/uspoof.cpp", |
| 455 |
"i18n/uspoof_impl.cpp", |
| 456 |
] |
| 457 |
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] |
| 458 |
|
| 459 |
if env.editor_build: |
| 460 |
icudata = env_icu.CommandNoCache( |
| 461 |
"#thirdparty/icu4c/icudata.gen.h", |
| 462 |
"#thirdparty/icu4c/icudt_godot.dat", |
| 463 |
env.Run(text_server_adv_builders.make_icu_data), |
| 464 |
) |
| 465 |
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/"]) |
| 466 |
else: |
| 467 |
thirdparty_sources += ["icu_data/icudata_stub.cpp"] |
| 468 |
|
| 469 |
env_icu.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"]) |
| 470 |
env_icu.Append( |
| 471 |
CPPDEFINES=[ |
| 472 |
"U_STATIC_IMPLEMENTATION", |
| 473 |
"U_COMMON_IMPLEMENTATION", |
| 474 |
"UCONFIG_NO_COLLATION", |
| 475 |
"UCONFIG_NO_CONVERSION", |
| 476 |
"UCONFIG_NO_FORMATTING", |
| 477 |
"UCONFIG_NO_SERVICE", |
| 478 |
"UCONFIG_NO_IDNA", |
| 479 |
"UCONFIG_NO_FILE_IO", |
| 480 |
"UCONFIG_NO_TRANSLITERATION", |
| 481 |
"UCONFIG_NO_REGULAR_EXPRESSIONS", |
| 482 |
("PKGDATA_MODE", "static"), |
| 483 |
("U_ENABLE_DYLOAD", 0), |
| 484 |
("U_HAVE_LIB_SUFFIX", 1), |
| 485 |
("U_LIB_SUFFIX_C_NAME", "_godot"), |
| 486 |
] |
| 487 |
) |
| 488 |
env_text_server_adv.Append( |
| 489 |
CPPDEFINES=[ |
| 490 |
"U_STATIC_IMPLEMENTATION", |
| 491 |
("U_HAVE_LIB_SUFFIX", 1), |
| 492 |
("U_LIB_SUFFIX_C_NAME", "_godot"), |
| 493 |
] |
| 494 |
) |
| 495 |
if env.editor_build: |
| 496 |
env_text_server_adv.Append(CPPDEFINES=["ICU_STATIC_DATA"]) |
| 497 |
|
| 498 |
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"]) |
| 499 |
|
| 500 |
lib = env_icu.add_library("icu_builtin", thirdparty_sources) |
| 501 |
thirdparty_obj += lib |
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
inserted = False |
| 508 |
for idx, linklib in enumerate(env["LIBS"]): |
| 509 |
if isinstance(linklib, (str, bytes)): |
| 510 |
env["LIBS"].insert(idx, lib) |
| 511 |
inserted = True |
| 512 |
break |
| 513 |
if not inserted: |
| 514 |
env.Append(LIBS=[lib]) |
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
module_obj = [] |
| 520 |
|
| 521 |
if env["builtin_msdfgen"] and msdfgen_enabled: |
| 522 |
env_text_server_adv.Append(CPPDEFINES=[("MSDFGEN_PUBLIC", "")]) |
| 523 |
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/msdfgen"]) |
| 524 |
|
| 525 |
if env["builtin_freetype"] and freetype_enabled: |
| 526 |
env_text_server_adv.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"]) |
| 527 |
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/freetype/include"]) |
| 528 |
|
| 529 |
if env["builtin_graphite"] and freetype_enabled and env["graphite"]: |
| 530 |
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/graphite/include"]) |
| 531 |
|
| 532 |
env_text_server_adv.add_source_files(module_obj, "*.cpp") |
| 533 |
env.modules_sources += module_obj |
| 534 |
|
| 535 |
|
| 536 |
env.Depends(module_obj, thirdparty_obj) |