compile libtiff with webp on windows

This commit is contained in:
nulano 2022-09-05 12:48:42 +02:00
parent ffedfe034a
commit 757ee8cf52
No known key found for this signature in database
GPG Key ID: B650CDF63B705766
2 changed files with 30 additions and 21 deletions

View File

@ -90,14 +90,14 @@ jobs:
if: steps.build-cache.outputs.cache-hit != 'true'
run: "& winbuild\\build\\build_dep_xz.cmd"
- name: Build dependencies / LibTiff
if: steps.build-cache.outputs.cache-hit != 'true'
run: "& winbuild\\build\\build_dep_libtiff.cmd"
- name: Build dependencies / WebP
if: steps.build-cache.outputs.cache-hit != 'true'
run: "& winbuild\\build\\build_dep_libwebp.cmd"
- name: Build dependencies / LibTiff
if: steps.build-cache.outputs.cache-hit != 'true'
run: "& winbuild\\build\\build_dep_libtiff.cmd"
# for FreeType CBDT/SBIX font support
- name: Build dependencies / libpng
if: steps.build-cache.outputs.cache-hit != 'true'

View File

@ -176,6 +176,28 @@ deps = {
"headers": [r"src\liblzma\api\lzma.h"],
"libs": [r"windows\vs2019\Release\{msbuild_arch}\liblzma\liblzma.lib"],
},
"libwebp": {
"url": "http://downloads.webmproject.org/releases/webp/libwebp-1.2.4.tar.gz",
"filename": "libwebp-1.2.4.tar.gz",
"dir": "libwebp-1.2.4",
"license": "COPYING",
"build": [
cmd_rmdir(r"output\release-static"), # clean
cmd_nmake(
"Makefile.vc",
"all",
[
"CFG=release-static",
"OBJDIR=output",
"ARCH={architecture}",
"LIBWEBP_BASENAME=webp",
],
),
cmd_mkdir(r"{inc_dir}\webp"),
cmd_copy(r"src\webp\*.h", r"{inc_dir}\webp"),
],
"libs": [r"output\release-static\{architecture}\lib\*.lib"],
},
"libtiff": {
"url": "https://download.osgeo.org/libtiff/tiff-4.4.0.tar.gz",
"filename": "tiff-4.4.0.tar.gz",
@ -190,6 +212,10 @@ deps = {
# link against liblzma.lib
"#ifdef LZMA_SUPPORT": '#ifdef LZMA_SUPPORT\n#pragma comment(lib, "liblzma.lib")', # noqa: E501
},
r"libtiff\tif_webp.c": {
# link against webp.lib
"#ifdef WEBP_SUPPORT": '#ifdef WEBP_SUPPORT\n#pragma comment(lib, "webp.lib")', # noqa: E501
},
},
"build": [
cmd_cmake("-DBUILD_SHARED_LIBS:BOOL=OFF"),
@ -200,23 +226,6 @@ deps = {
"libs": [r"libtiff\*.lib"],
# "bins": [r"libtiff\*.dll"],
},
"libwebp": {
"url": "http://downloads.webmproject.org/releases/webp/libwebp-1.2.4.tar.gz",
"filename": "libwebp-1.2.4.tar.gz",
"dir": "libwebp-1.2.4",
"license": "COPYING",
"build": [
cmd_rmdir(r"output\release-static"), # clean
cmd_nmake(
"Makefile.vc",
"all",
["CFG=release-static", "OBJDIR=output", "ARCH={architecture}"],
),
cmd_mkdir(r"{inc_dir}\webp"),
cmd_copy(r"src\webp\*.h", r"{inc_dir}\webp"),
],
"libs": [r"output\release-static\{architecture}\lib\*.lib"],
},
"libpng": {
"url": SF_PROJECTS + "/libpng/files/libpng16/1.6.37/lpng1637.zip/download",
"filename": "lpng1637.zip",