summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMartin Matuška <martin@matuska.org>2020-04-24 03:47:42 +0200
committerGitHub <noreply@github.com>2020-04-24 03:47:42 +0200
commitdf072ed4ce4256a60f4951eaaf6b89733e394eed (patch)
treed76d4bdf0095bd0ce7f9bc8a4441ba5bfc9860be /CMakeLists.txt
parent4a6e98919923c2d8e426d3103c5014aeb1c213f0 (diff)
parentdd84e20f4f771ada398fcc1610c662e9f398dcd9 (diff)
downloadlibarchive-df072ed4ce4256a60f4951eaaf6b89733e394eed.tar.gz
Merge pull request #1363 from aseprite/dont-test-lzma-if-not-needed
Don't even try HAVE_LZMA_STREAM_ENCODER_MT if ENABLE_LZMA is disabled
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57b8e5b2..ab3bcf1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1449,9 +1449,13 @@ CHECK_C_SOURCE_COMPILES(
"#include <sys/sysmacros.h>\nint main() { return major(256); }"
MAJOR_IN_SYSMACROS)
+IF(ENABLE_LZMA)
CHECK_C_SOURCE_COMPILES(
"#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}"
HAVE_LZMA_STREAM_ENCODER_MT)
+ELSE()
+ SET(HAVE_LZMA_STREAM_ENCODER_MT 0)
+ENDIF(ENABLE_LZMA)
IF(HAVE_STRERROR_R)
SET(HAVE_DECL_STRERROR_R 1)