@@ -179,7 +179,15 @@ def cmd_msbuild(
179
179
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" : "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" , # noqa: E501
180
180
# freetype doesn't specify SDK version, MSBuild may guess incorrectly
181
181
'<PropertyGroup Label="Globals">' : '<PropertyGroup Label="Globals">\n <WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>' , # noqa: E501
182
- }
182
+ },
183
+ r"builds\windows\vc2010\freetype.user.props" : {
184
+ "<UserDefines></UserDefines>" : "<UserDefines>FT_CONFIG_OPTION_USE_HARFBUZZ</UserDefines>" , # noqa: E501
185
+ "<UserIncludeDirectories></UserIncludeDirectories>" : r"<UserIncludeDirectories>{dir_harfbuzz}\src</UserIncludeDirectories>" , # noqa: E501
186
+ },
187
+ r"src/autofit/afshaper.c" : {
188
+ # link against harfbuzz.lib once it becomes available
189
+ "#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ" : '#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n #pragma comment(lib, "harfbuzz.lib")' , # noqa: E501
190
+ },
183
191
},
184
192
"build" : [
185
193
cmd_rmdir ("objs" ),
@@ -488,7 +496,7 @@ def build_pillow():
488
496
elif arg == "--no-imagequant" :
489
497
disabled += ["libimagequant" ]
490
498
elif arg == "--no-raqm" :
491
- disabled += ["harfbuzz" , " fribidi" , "libraqm" ]
499
+ disabled += ["fribidi" , "libraqm" ]
492
500
elif arg .startswith ("--depends=" ):
493
501
depends_dir = arg [10 :]
494
502
elif arg .startswith ("--python=" ):
@@ -562,6 +570,9 @@ def build_pillow():
562
570
"header" : sum ([header , msvs ["header" ], ["@echo on" ]], []),
563
571
}
564
572
573
+ for k , v in deps .items ():
574
+ prefs [f"dir_{ k } " ] = os .path .join (sources_dir , v ["dir" ])
575
+
565
576
print ()
566
577
567
578
write_script (".gitignore" , ["*" ])
0 commit comments