summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--cmake/LERCCodec.cmake2
-rw-r--r--tools/tiffcp.c12
3 files changed, 15 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dddbaf6a..e87de753 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,7 +185,11 @@ else()
endif()
message(STATUS " JPEG 8/12 bit dual mode: Requested:${jpeg12} Availability:${JPEG12_FOUND} Support:${JPEG_DUAL_MODE_8_12}")
message(STATUS " ISO JBIG support: Requested:${jbig} Availability:${JBIG_FOUND} Support:${JBIG_SUPPORT}")
-message(STATUS " LERC support: Requested:${lerc} Availability:${LERC_FOUND} Support:${LERC_SUPPORT}")
+if(ZLIB_SUPPORT)
+ message(STATUS " LERC support: Requested:${lerc} Availability:${LERC_FOUND} Support:${LERC_SUPPORT}")
+else()
+ message(STATUS " LERC support: Requested:${lerc} Availability:${LERC_FOUND} Support:${LERC_SUPPORT} (Depends on ZLIB Support)")
+endif()
message(STATUS " LZMA2 support: Requested:${lzma} Availability:${LIBLZMA_FOUND} Support:${LZMA_SUPPORT}")
message(STATUS " ZSTD support: Requested:${zstd} Availability:${ZSTD_USABLE} Support:${ZSTD_SUPPORT}")
message(STATUS " WEBP support: Requested:${webp} Availability:${WEBP_FOUND} Support:${WEBP_SUPPORT}")
diff --git a/cmake/LERCCodec.cmake b/cmake/LERCCodec.cmake
index 7344bfa5..54504ca1 100644
--- a/cmake/LERCCodec.cmake
+++ b/cmake/LERCCodec.cmake
@@ -27,6 +27,6 @@
set(LERC_SUPPORT FALSE)
find_package(LERC)
option(lerc "use libLerc (required for LERC compression)" ${LERC_FOUND})
-if (lerc AND LERC_FOUND)
+if (lerc AND LERC_FOUND AND ZIP_SUPPORT)
set(LERC_SUPPORT TRUE)
endif()
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
index 1f889516..224583e0 100644
--- a/tools/tiffcp.c
+++ b/tools/tiffcp.c
@@ -510,10 +510,16 @@ static const char usage_info[] =
" -c lerc[:opts] compress output with LERC encoding\n"
/* " LERC options:", */
" # set max_z_error value\n"
-" s# set subcodec: 0=none, 1=deflate, 2=zstd (default 0)\n"
" p# set compression level (preset)\n"
-" For example, -c lerc:0.5:s2:p22 for max_z_error 0.5,\n"
-" zstd additional copression with maximum compression level.\n"
+ #ifdef ZSTD_SUPPORT
+ " s# set subcodec: 0=none, 1=deflate, 2=zstd (default 0)\n"
+ " For example, -c lerc:0.5:s2:p22 for max_z_error 0.5,\n"
+ " zstd additional compression with maximum compression level.\n"
+ #else
+ " s# set subcodec: 0=none, 1=deflate (default 0)\n"
+ " For example, -c lerc:0.5:s1:p12 for max_z_error 0.5,\n"
+ " deflate additional compression with maximum compression level.\n"
+ #endif
#endif
#ifdef LZMA_SUPPORT
" -c lzma[:opts] compress output with LZMA2 encoding\n"