@ -19,6 +19,7 @@ env = SConscript("./godot-cpp/SConstruct")
env . __class__ . disable_warnings = methods . disable_warnings
opts = Variables ( [ ] , ARGUMENTS )
opts . Add ( BoolVariable ( " brotli_enabled " , " Use Brotli library " , True ) )
opts . Add ( BoolVariable ( " freetype_enabled " , " Use FreeType library " , True ) )
opts . Add ( BoolVariable ( " msdfgen_enabled " , " Use MSDFgen library (require FreeType) " , True ) )
opts . Add ( BoolVariable ( " graphite_enabled " , " Use Graphite library (require FreeType) " , True ) )
@ -162,6 +163,25 @@ if env["freetype_enabled"]:
]
thirdparty_freetype_sources + = [ thirdparty_zlib_dir + file for file in thirdparty_zlib_sources ]
if env [ " brotli_enabled " ] :
thirdparty_brotli_dir = " ../../../thirdparty/brotli/ "
thirdparty_brotli_sources = [
" common/constants.c " ,
" common/context.c " ,
" common/dictionary.c " ,
" common/platform.c " ,
" common/shared_dictionary.c " ,
" common/transform.c " ,
" dec/bit_reader.c " ,
" dec/decode.c " ,
" dec/huffman.c " ,
" dec/state.c " ,
]
thirdparty_freetype_sources + = [ thirdparty_brotli_dir + file for file in thirdparty_brotli_sources ]
env_freetype . Append ( CPPDEFINES = [ " FT_CONFIG_OPTION_USE_BROTLI " ] )
env_freetype . Prepend ( CPPPATH = [ thirdparty_brotli_dir + " include " ] )
env . Append ( CPPDEFINES = [ " FT_CONFIG_OPTION_USE_BROTLI " ] )
env_freetype . Append ( CPPPATH = [ thirdparty_freetype_dir + " /include " , thirdparty_zlib_dir , thirdparty_png_dir ] )
env . Append ( CPPPATH = [ thirdparty_freetype_dir + " /include " ] )
@ -265,6 +285,7 @@ env_harfbuzz.Append(
CPPPATH = [
" ../../../thirdparty/harfbuzz/src " ,
" ../../../thirdparty/icu4c/common/ " ,
" ../../../thirdparty/icu4c/i18n/ " ,
]
)
@ -569,6 +590,10 @@ thirdparty_icu_sources = [
" common/uvectr32.cpp " ,
" common/uvectr64.cpp " ,
" common/wintz.cpp " ,
" i18n/scriptset.cpp " ,
" i18n/ucln_in.cpp " ,
" i18n/uspoof.cpp " ,
" i18n/uspoof_impl.cpp " ,
]
thirdparty_icu_sources = [ thirdparty_icu_dir + file for file in thirdparty_icu_sources ]
@ -584,7 +609,7 @@ if env["static_icu_data"]:
else :
thirdparty_sources + = [ " ../icu_data/icudata_stub.cpp " ]
env_icu . Append ( CPPPATH = [ " ../../../thirdparty/icu4c/common/ " ])
env_icu . Append ( CPPPATH = [ " ../../../thirdparty/icu4c/common/ " , " ../../../thirdparty/icu4c/i18n/ " ])
env_icu . Append (
CXXFLAGS = [
" -DU_STATIC_IMPLEMENTATION " ,
@ -610,7 +635,7 @@ env.Append(
" -DICU_DATA_NAME= " + icu_data_name ,
]
)
env . Append ( CPPPATH = [ " ../../../thirdparty/icu4c/common/ " ])
env . Append ( CPPPATH = [ " ../../../thirdparty/icu4c/common/ " , " ../../../thirdparty/icu4c/i18n/ " ])
if env [ " platform " ] == " windows " :
env . Append ( LIBS = [ " advapi32 " ] )