Merge pull request #4915 from nulano/ft-hb

Winbuild: Enable FT_CONFIG_OPTION_USE_HARFBUZZ
This commit is contained in:
Hugo van Kemenade 2020-09-19 13:41:46 +03:00 committed by GitHub
commit c2367400fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,7 +179,15 @@ deps = {
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>", # noqa: E501 "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>", # noqa: E501
# freetype doesn't specify SDK version, MSBuild may guess incorrectly # freetype doesn't specify SDK version, MSBuild may guess incorrectly
'<PropertyGroup Label="Globals">': '<PropertyGroup Label="Globals">\n <WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>', # noqa: E501 '<PropertyGroup Label="Globals">': '<PropertyGroup Label="Globals">\n <WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>', # noqa: E501
} },
r"builds\windows\vc2010\freetype.user.props": {
"<UserDefines></UserDefines>": "<UserDefines>FT_CONFIG_OPTION_USE_HARFBUZZ</UserDefines>", # noqa: E501
"<UserIncludeDirectories></UserIncludeDirectories>": r"<UserIncludeDirectories>{dir_harfbuzz}\src</UserIncludeDirectories>", # noqa: E501
},
r"src/autofit/afshaper.c": {
# link against harfbuzz.lib once it becomes available
"#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ": '#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n#pragma comment(lib, "harfbuzz.lib")', # noqa: E501
},
}, },
"build": [ "build": [
cmd_rmdir("objs"), cmd_rmdir("objs"),
@ -488,7 +496,7 @@ if __name__ == "__main__":
elif arg == "--no-imagequant": elif arg == "--no-imagequant":
disabled += ["libimagequant"] disabled += ["libimagequant"]
elif arg == "--no-raqm": elif arg == "--no-raqm":
disabled += ["harfbuzz", "fribidi", "libraqm"] disabled += ["fribidi", "libraqm"]
elif arg.startswith("--depends="): elif arg.startswith("--depends="):
depends_dir = arg[10:] depends_dir = arg[10:]
elif arg.startswith("--python="): elif arg.startswith("--python="):
@ -562,6 +570,9 @@ if __name__ == "__main__":
"header": sum([header, msvs["header"], ["@echo on"]], []), "header": sum([header, msvs["header"], ["@echo on"]], []),
} }
for k, v in deps.items():
prefs[f"dir_{k}"] = os.path.join(sources_dir, v["dir"])
print() print()
write_script(".gitignore", ["*"]) write_script(".gitignore", ["*"])