Expose brotli decompression to the scripting API.
This commit is contained in:
@ -59,25 +59,7 @@ if env["builtin_freetype"]:
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
if env["brotli"]:
|
||||
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_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"])
|
||||
|
||||
if env.get("use_ubsan") or env.get("use_asan") or env.get("use_tsan") or env.get("use_lsan") or env.get("use_msan"):
|
||||
env_freetype.Append(CPPDEFINES=["BROTLI_BUILD_PORTABLE"])
|
||||
|
||||
if env["platform"] == "uwp":
|
||||
# Include header for UWP to fix build issues
|
||||
|
||||
@ -2,13 +2,5 @@ def can_build(env, platform):
|
||||
return True
|
||||
|
||||
|
||||
def get_opts(platform):
|
||||
from SCons.Variables import BoolVariable
|
||||
|
||||
return [
|
||||
BoolVariable("brotli", "Enable Brotli decompressor for WOFF2 fonts support", True),
|
||||
]
|
||||
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user