diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 6a3aeaf642f..d66a78b07ec 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -179,7 +179,15 @@ def cmd_msbuild( "MultiThreaded": "MultiThreadedDLL", # noqa: E501 # freetype doesn't specify SDK version, MSBuild may guess incorrectly '': '\n $(WindowsSDKVersion)', # noqa: E501 - } + }, + r"builds\windows\vc2010\freetype.user.props": { + "": "FT_CONFIG_OPTION_USE_HARFBUZZ", # noqa: E501 + "": r"{dir_harfbuzz}\src", # 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": [ cmd_rmdir("objs"), @@ -488,7 +496,7 @@ def build_pillow(): elif arg == "--no-imagequant": disabled += ["libimagequant"] elif arg == "--no-raqm": - disabled += ["harfbuzz", "fribidi", "libraqm"] + disabled += ["fribidi", "libraqm"] elif arg.startswith("--depends="): depends_dir = arg[10:] elif arg.startswith("--python="): @@ -562,6 +570,9 @@ def build_pillow(): "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() write_script(".gitignore", ["*"])