Skip to content
代码片段 群组 项目
提交 c0e71cae 编辑于 作者: Lzu Tao's avatar Lzu Tao
浏览文件

Add enable_lz4 build option and fix lzma dependency

上级 5c4965c3
No related branches found
No related tags found
无相关合并请求
......@@ -50,6 +50,7 @@ enable_contrib = get_option('build_contrib')
enable_multithread = get_option('multithread_support')
enable_zlib = get_option('zlib_support')
enable_lzma = get_option('lzma_support')
enable_lz4 = get_option('lz4_support')
# =============================================================================
# Helper scripts for Meson
......@@ -78,7 +79,8 @@ endif
libm_dep = cc.find_library('m', required: true)
thread_dep = dependency('threads', 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
......
......@@ -24,3 +24,5 @@ option('zlib_support', type: 'boolean', value: false,
description: 'Enable zlib support')
option('lzma_support', type: 'boolean', value: false,
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' ]
endif
if enable_lz4 and lz4_dep.found()
zstd_deps += [ lz4_dep ]
zstd_c_args += [ '-DZSTD_LZ4COMPRESS', '-DZSTD_LZ4DECOMPRESS' ]
endif
zstd = executable('zstd',
zstd_programs_sources,
c_args: zstd_c_args,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册