Skip to content

Commit

Permalink
💾 Add TIFF support
Browse files Browse the repository at this point in the history
See this issue: #117
  • Loading branch information
dbouron committed Mar 27, 2022
1 parent c46e83a commit 9d31372
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 498 deletions.
27 changes: 25 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ else()
add_custom_target(libjpeg "")
endif()

find_library(TIFF tiff EXACT PATHS "${EXT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
if(NOT TIFF)
ExternalProject_Add(tiff
URL "http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/tiff"
CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tiff/src/tiff/configure
${CONFIGURE_VARS}
--enable-shared
--disable-static
--without-x
--disable-cxx
--disable-lzma
DEPENDS libjpeg
)
else()
add_custom_target(tiff "")
endif()

if (WITH_LIBSPNG)
list(APPEND LIBSPNG_FLAGS
--with-libspng
Expand Down Expand Up @@ -181,6 +199,8 @@ if(NOT LIBWEBP)
--with-jpeglibdir=${EXT_INSTALL_DIR}/lib
--with-pngincludedir=${EXT_INSTALL_DIR}/include
--with-pnglibdir=${EXT_INSTALL_DIR}/lib
--with-tiffincludedir=${EXT_INSTALL_DIR}/include
--with-tifflibdir=${EXT_INSTALL_DIR}/lib
--enable-shared
--disable-static
--disable-dependency-tracking
Expand All @@ -191,7 +211,7 @@ if(NOT LIBWEBP)
--enable-sse4.1
--enable-sse2
--enable-threading
DEPENDS libjpeg libpng giflib
DEPENDS libjpeg libpng giflib tiff
)
else()
add_custom_target(libwebp "")
Expand Down Expand Up @@ -272,13 +292,16 @@ if(NOT VIPS)
--with-jpeg
--with-jpeg-includes=${EXT_INSTALL_DIR}/include
--with-jpeg-libraries=${EXT_INSTALL_DIR}/lib
--with-tiff
--with-tiff-includes=${EXT_INSTALL_DIR}/include
--with-tiff-libraries=${EXT_INSTALL_DIR}/lib
--without-magick
--without-orc
--without-gsf
--without-rsvg
${LIBSPNG_FLAGS}
${LIBHEIF_FLAGS}
DEPENDS libjpeg libpng libspng giflib libwebp libimagequant lcms2 libheif
DEPENDS libjpeg libpng libspng giflib libwebp libimagequant lcms2 libheif tiff
BUILD_IN_SOURCE 1
)
else()
Expand Down
1 change: 1 addition & 0 deletions lib/VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ WEBP_VERSION=1.1.0
AOM_VERSION=2.0.0
HEIF_VERSION=1.9.1
LCMS2_VERSION=2.11
TIFF_VERSION=4.1.0
VIPS_VERSION=8.12.1
21 changes: 0 additions & 21 deletions src/main/c/Vips.h

This file was deleted.

77 changes: 0 additions & 77 deletions src/main/c/VipsContext.h

This file was deleted.

Loading

0 comments on commit 9d31372

Please sign in to comment.