Add enable_lz4 build option and fix lzma dependency
This commit is contained in:
parent
5c4965c351
commit
c0e71cae55
@ -50,6 +50,7 @@ enable_contrib = get_option('build_contrib')
|
|||||||
enable_multithread = get_option('multithread_support')
|
enable_multithread = get_option('multithread_support')
|
||||||
enable_zlib = get_option('zlib_support')
|
enable_zlib = get_option('zlib_support')
|
||||||
enable_lzma = get_option('lzma_support')
|
enable_lzma = get_option('lzma_support')
|
||||||
|
enable_lz4 = get_option('lz4_support')
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Helper scripts for Meson
|
# Helper scripts for Meson
|
||||||
@ -78,7 +79,8 @@ endif
|
|||||||
libm_dep = cc.find_library('m', required: true)
|
libm_dep = cc.find_library('m', required: true)
|
||||||
thread_dep = dependency('threads', required: false)
|
thread_dep = dependency('threads', required: false)
|
||||||
zlib_dep = dependency('zlib', required: false)
|
zlib_dep = dependency('zlib', required: false)
|
||||||
lzma_dep = dependency('lzma', required: false)
|
lzma_dep = dependency('liblzma', required: false)
|
||||||
|
lz4_dep = dependency('liblz4', required: false)
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Compiler flags
|
# Compiler flags
|
||||||
|
@ -24,3 +24,5 @@ option('zlib_support', type: 'boolean', value: false,
|
|||||||
description: 'Enable zlib support')
|
description: 'Enable zlib support')
|
||||||
option('lzma_support', type: 'boolean', value: false,
|
option('lzma_support', type: 'boolean', value: false,
|
||||||
description: 'Enable lzma support')
|
description: 'Enable lzma support')
|
||||||
|
option('lz4_support', type: 'boolean', value: false,
|
||||||
|
description: 'Enable lz4 support')
|
||||||
|
@ -38,6 +38,11 @@ if enable_lzma and lzma_dep.found()
|
|||||||
zstd_c_args += [ '-DZSTD_LZMACOMPRESS', '-DZSTD_LZMADECOMPRESS' ]
|
zstd_c_args += [ '-DZSTD_LZMACOMPRESS', '-DZSTD_LZMADECOMPRESS' ]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if enable_lz4 and lz4_dep.found()
|
||||||
|
zstd_deps += [ lz4_dep ]
|
||||||
|
zstd_c_args += [ '-DZSTD_LZ4COMPRESS', '-DZSTD_LZ4DECOMPRESS' ]
|
||||||
|
endif
|
||||||
|
|
||||||
zstd = executable('zstd',
|
zstd = executable('zstd',
|
||||||
zstd_programs_sources,
|
zstd_programs_sources,
|
||||||
c_args: zstd_c_args,
|
c_args: zstd_c_args,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user