Skip to content

Commit cafd389

Browse files
authored
Merge pull request #5359 from nulano/libtiff-cmake
2 parents 8c852e4 + 7c48f12 commit cafd389

File tree

4 files changed

+10
-228
lines changed

4 files changed

+10
-228
lines changed

.github/workflows/test-windows.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
- name: Install dependencies
6969
id: install
7070
run: |
71-
7z x winbuild\depends\nasm-2.14.02-win64.zip "-o$env:RUNNER_WORKSPACE\"
72-
echo "$env:RUNNER_WORKSPACE\nasm-2.14.02" >> $env:GITHUB_PATH
71+
7z x winbuild\depends\nasm-2.15.05-win64.zip "-o$env:RUNNER_WORKSPACE\"
72+
echo "$env:RUNNER_WORKSPACE\nasm-2.15.05" >> $env:GITHUB_PATH
7373
7474
winbuild\depends\gs9540w32.exe /S
7575
echo "C:\Program Files (x86)\gs\gs9.54.0\bin" >> $env:GITHUB_PATH

setup.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -810,9 +810,11 @@ def build_extensions(self):
810810
if feature.tiff:
811811
libs.append(feature.tiff)
812812
defs.append(("HAVE_LIBTIFF", None))
813-
# FIXME the following define should be detected automatically
814-
# based on system libtiff, see #4237
815-
if PLATFORM_MINGW:
813+
if sys.platform == "win32":
814+
# This define needs to be defined if-and-only-if it was defined
815+
# when compiling LibTIFF. LibTIFF doesn't expose it in `tiffconf.h`,
816+
# so we have to guess; by default it is defined in all Windows builds.
817+
# See #4237, #5243, #5359 for more information.
816818
defs.append(("USE_WIN32_FILEIO", None))
817819
if feature.xcb:
818820
libs.append(feature.xcb)

winbuild/build_prepare.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def cmd_msbuild(
145145
"filename": "tiff-4.2.0.tar.gz",
146146
"dir": "tiff-4.2.0",
147147
"build": [
148-
cmd_copy(r"{winbuild_dir}\tiff.opt", "nmake.opt"),
149-
cmd_nmake("makefile.vc", "clean"),
150-
cmd_nmake("makefile.vc", "lib"),
148+
cmd_cmake("-DBUILD_SHARED_LIBS:BOOL=OFF"),
149+
cmd_nmake(target="clean"),
150+
cmd_nmake(target="tiff"),
151151
],
152152
"headers": [r"libtiff\tiff*.h"],
153153
"libs": [r"libtiff\*.lib"],

winbuild/tiff.opt

-220
This file was deleted.

0 commit comments

Comments
 (0)