mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 02:06:22 -04:00
Ease requirements on library versions
This commit is contained in:
parent
7c1b048f66
commit
4d26b50c36
@ -18,7 +18,7 @@
|
||||
|
||||
project(dwarfs)
|
||||
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
|
||||
option(WITH_TESTS "build with tests" OFF)
|
||||
|
||||
@ -43,10 +43,10 @@ find_package(PkgConfig REQUIRED)
|
||||
find_package(Boost 1.67 REQUIRED COMPONENTS date_time filesystem
|
||||
program_options system)
|
||||
|
||||
pkg_check_modules(FUSE3 REQUIRED IMPORTED_TARGET fuse3>=3.9.1)
|
||||
pkg_check_modules(LIBLZ4 IMPORTED_TARGET liblz4>=1.9.2)
|
||||
pkg_check_modules(LIBLZMA IMPORTED_TARGET liblzma>=5.2.5)
|
||||
pkg_check_modules(LIBZSTD IMPORTED_TARGET libzstd>=1.4.4)
|
||||
pkg_check_modules(FUSE3 REQUIRED IMPORTED_TARGET fuse3>=3.4.1)
|
||||
pkg_check_modules(LIBLZ4 IMPORTED_TARGET liblz4>=1.8.3)
|
||||
pkg_check_modules(LIBLZMA IMPORTED_TARGET liblzma>=5.2.4)
|
||||
pkg_check_modules(LIBZSTD IMPORTED_TARGET libzstd>=1.3.8)
|
||||
|
||||
add_subdirectory(folly EXCLUDE_FROM_ALL)
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <folly/Format.h>
|
||||
#include <folly/gen/String.h>
|
||||
|
||||
#if DWARFS_HAVE_LIBZSTD
|
||||
#ifdef DWARFS_HAVE_LIBZSTD
|
||||
#include <zstd.h>
|
||||
#endif
|
||||
|
||||
@ -63,6 +63,15 @@ using namespace dwarfs;
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef DWARFS_HAVE_LIBZSTD
|
||||
#if ZSTD_VERSION_MAJOR > 1 || \
|
||||
(ZSTD_VERSION_MAJOR == 1 && ZSTD_VERSION_MINOR >= 4)
|
||||
#define ZSTD_MIN_LEVEL ZSTD_minCLevel()
|
||||
#else
|
||||
#define ZSTD_MIN_LEVEL 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DWARFS_HAVE_LUA
|
||||
constexpr const char* script_name = "dwarfs.lua";
|
||||
#endif
|
||||
@ -322,7 +331,7 @@ int mkdwarfs(int argc, char** argv) {
|
||||
#ifdef DWARFS_HAVE_LIBZSTD
|
||||
" zstd ZSTD compression\n"
|
||||
" level=["
|
||||
<< ZSTD_minCLevel() << ".." << ZSTD_maxCLevel()
|
||||
<< ZSTD_MIN_LEVEL << ".." << ZSTD_maxCLevel()
|
||||
<< "]\n"
|
||||
#endif
|
||||
#ifdef DWARFS_HAVE_LIBLZMA
|
||||
|
Loading…
x
Reference in New Issue
Block a user