diff options
author | William Bader <william@newspapersystems.com> | 2016-02-25 21:01:16 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2016-02-25 21:01:16 +1030 |
commit | 989ceb6bd90cc8a79dd48c58183f1855de269c9b (patch) | |
tree | c4bbc887115d82ff97b463ec4076c22651777722 /CMakeLists.txt | |
parent | 91c0be60f3e7a53373ba660702358cf52f74d1b2 (diff) |
Add support for Flate compression in Level 3 PostScript output.
The changes to the build variables are from Adrian Johnson's DeflateStream
patches at https://bugs.freedesktop.org/attachment.cgi?id=89776
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d30fa4b1..d5474f63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,8 @@ option(ENABLE_CPP "Compile poppler cpp wrapper." ON) set(ENABLE_LIBOPENJPEG "auto" CACHE STRING "Use libopenjpeg for JPX streams. Possible values: auto, openjpeg1, openjpeg2. 'auto' prefers openjpeg1 over openjpeg2 if both are available. Unset to not use openjpeg.") set(ENABLE_CMS "auto" CACHE STRING "Use color management system. Possible values: auto, lcms1, lcms2. 'auto' prefers lcms2 over lcms1 if both are available. Unset to disable color management system.") option(ENABLE_LIBCURL "Build libcurl based HTTP support." OFF) -option(ENABLE_ZLIB "Build with zlib (not totally safe)." OFF) +option(ENABLE_ZLIB "Build with zlib." ON) +option(ENABLE_ZLIB_UNCOMPRESS "Use zlib to uncompress flate streams (not totally safe)." OFF) option(SPLASH_CMYK "Include support for CMYK rasterization." OFF) option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend" OFF) option(USE_FLOAT "Use single precision arithmetic in the Splash backend" OFF) @@ -158,6 +159,10 @@ if(ENABLE_ZLIB) endif(ZLIB_FOUND) set(ENABLE_ZLIB ${ZLIB_FOUND}) endif(ENABLE_ZLIB) +if(ENABLE_ZLIB_UNCOMPRESS AND NOT ENABLE_ZLIB) + message("Warning: ENABLE_ZLIB_UNCOMPRESS requires ENABLE_ZLIB") + set(ENABLE_ZLIB_UNCOMPRESS FALSE) +endif(ENABLE_ZLIB_UNCOMPRESS AND NOT ENABLE_ZLIB) set(USE_OPENJPEG1 FALSE) set(USE_OPENJPEG2 FALSE) set(WITH_OPENJPEG FALSE) @@ -420,10 +425,15 @@ if(JPEG_FOUND) endif(JPEG_FOUND) if(ENABLE_ZLIB) set(poppler_SRCS ${poppler_SRCS} - poppler/FlateStream.cc + poppler/FlateEncoder.cc ) set(poppler_LIBS ${poppler_LIBS} ${ZLIB_LIBRARIES}) endif(ENABLE_ZLIB) +if(ENABLE_ZLIB_UNCOMPRESS) + set(poppler_SRCS ${poppler_SRCS} + poppler/FlateStream.cc + ) +endif(ENABLE_ZLIB_UNCOMPRESS) if(ENABLE_LIBCURL) set(poppler_SRCS ${poppler_SRCS} poppler/CurlCachedFile.cc @@ -716,7 +726,8 @@ show_end_message("use gtk-doc" "not supported with this CMake build system") show_end_message_yesno("use libjpeg" ENABLE_LIBJPEG) show_end_message_yesno("use libpng" ENABLE_LIBPNG) show_end_message_yesno("use libtiff" ENABLE_LIBTIFF) -show_end_message_yesno("use zlib" ENABLE_ZLIB) +show_end_message_yesno("use zlib compress" ENABLE_ZLIB) +show_end_message_yesno("use zlib uncompress" ENABLE_ZLIB_UNCOMPRESS) show_end_message_yesno("use curl" ENABLE_LIBCURL) show_end_message_yesno("use libopenjpeg" WITH_OPENJPEG) if(USE_OPENJPEG1) @@ -747,9 +758,9 @@ if(NOT ENABLE_LIBJPEG) message("Warning: Using libjpeg is recommended. The internal DCT decoder is unmaintained.") endif(NOT ENABLE_LIBJPEG) -if(ENABLE_ZLIB) +if(ENABLE_ZLIB_UNCOMPRESS) message("Warning: Using zlib is not totally safe") -endif(ENABLE_ZLIB) +endif(ENABLE_ZLIB_UNCOMPRESS) if(NOT WITH_OPENJPEG) message("Warning: Using libopenjpeg is recommended. The internal JPX decoder is unmaintained.") |