Skip to content

Commit 9b2ea83

Browse files
authored
Merge pull request #8744 from radarhere/imagequant
2 parents ad23135 + c566a81 commit 9b2ea83

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

winbuild/build_prepare.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def cmd_msbuild(
116116
"HARFBUZZ": "10.2.0",
117117
"JPEGTURBO": "3.1.0",
118118
"LCMS2": "2.16",
119+
"LIBIMAGEQUANT": "4.3.4",
119120
"LIBPNG": "1.6.46",
120121
"LIBWEBP": "1.5.0",
121122
"OPENJPEG": "2.5.3",
@@ -335,24 +336,15 @@ def cmd_msbuild(
335336
"libs": [r"bin\*.lib"],
336337
},
337338
"libimagequant": {
338-
# commit: Merge branch 'master' into msvc (matches 2.17.0 tag)
339-
"url": "https://github.com/ImageOptim/libimagequant/archive/e4c1334be0eff290af5e2b4155057c2953a313ab.zip",
340-
"filename": "libimagequant-e4c1334be0eff290af5e2b4155057c2953a313ab.zip",
339+
"url": "https://github.com/ImageOptim/libimagequant/archive/{V['LIBIMAGEQUANT']}.tar.gz",
340+
"filename": f"libimagequant-{V['LIBIMAGEQUANT']}.tar.gz",
341341
"license": "COPYRIGHT",
342-
"patch": {
343-
"CMakeLists.txt": {
344-
"if(OPENMP_FOUND)": "if(false)",
345-
"install": "#install",
346-
# libimagequant does not detect MSVC x86_arm64 cross-compiler correctly
347-
"if(${{CMAKE_SYSTEM_PROCESSOR}} STREQUAL ARM64)": "if({architecture} STREQUAL ARM64)", # noqa: E501
348-
}
349-
},
350342
"build": [
351-
*cmds_cmake("imagequant_a"),
352-
cmd_copy("imagequant_a.lib", "imagequant.lib"),
343+
cmd_cd("imagequant-sys"),
344+
"cargo build --release",
353345
],
354-
"headers": [r"*.h"],
355-
"libs": [r"imagequant.lib"],
346+
"headers": ["libimagequant.h"],
347+
"libs": [r"..\target\release\imagequant_sys.lib"],
356348
},
357349
"harfbuzz": {
358350
"url": f"https://github.com/harfbuzz/harfbuzz/archive/{V['HARFBUZZ']}.zip",

0 commit comments

Comments
 (0)