Skip to content

Commit

Permalink
Merge pull request #4915 from nulano/ft-hb
Browse files Browse the repository at this point in the history
Winbuild: Enable FT_CONFIG_OPTION_USE_HARFBUZZ
  • Loading branch information
hugovk authored Sep 19, 2020
2 parents 93d011e + d70fa8c commit c236740
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,15 @@ def cmd_msbuild(
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>", # noqa: E501
# freetype doesn't specify SDK version, MSBuild may guess incorrectly
'<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": [
cmd_rmdir("objs"),
Expand Down Expand Up @@ -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="):
Expand Down Expand Up @@ -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", ["*"])
Expand Down

0 comments on commit c236740

Please sign in to comment.