diff options
author | Petr Malat <oss@malat.biz> | 2021-12-23 11:47:04 +0100 |
---|---|---|
committer | Petr Malat <oss@malat.biz> | 2021-12-23 12:23:16 +0100 |
commit | 406165fcb2a1b3a49983d9e68fcbee9d3640fbea (patch) | |
tree | 3d62967daca48d0575f082c73c0c5cd4abd03367 /CMakeLists.txt | |
parent | 411284e3f5819a5726622f3f129ebf2859f2d46b (diff) | |
download | libarchive-406165fcb2a1b3a49983d9e68fcbee9d3640fbea.tar.gz |
Support libzstd compiled with compressor disabled
ZSTD library can be compiled with the compressor disabled, which is
handy on space restricted systems as the compressor accounts for more
than two thirds of the library size.
Detect this case and use libzstd for the decompression only.
Compression will be done using zstd binary if it's available.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dfdf966..1b38ffab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -618,7 +618,8 @@ IF(ZSTD_FOUND) CMAKE_PUSH_CHECK_STATE() SET(CMAKE_REQUIRED_LIBRARIES ${ZSTD_LIBRARY}) SET(CMAKE_REQUIRED_INCLUDES ${ZSTD_INCLUDE_DIR}) - CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD) + CHECK_FUNCTION_EXISTS(ZSTD_decompressStream HAVE_LIBZSTD) + CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD_COMPRESSOR) # # TODO: test for static library. # |