Skip to content

Commit 2de4c59

Browse files
authored
Add Zstd support through meson (#2293)
* Add Zstd support through meson * Add libzstd-dev to abitest
1 parent b7097f1 commit 2de4c59

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.github/workflows/abidiff.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
git
3030
libbrotli-dev
3131
libssl-dev
32+
libzstd-dev
3233
meson
3334
pkg-config
3435
python3

meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ if brotli_found_all
7474
args += '-DCPPHTTPLIB_BROTLI_SUPPORT'
7575
endif
7676

77+
zstd_dep = dependency('libzstd', required: get_option('zstd'))
78+
if zstd_dep.found()
79+
deps += zstd_dep
80+
args += '-DCPPHTTPLIB_ZSTD_SUPPORT'
81+
endif
82+
7783
async_ns_opt = get_option('non_blocking_getaddrinfo')
7884

7985
if host_machine.system() == 'windows'

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
option('openssl', type: 'feature', value: 'auto', description: 'Enable OpenSSL support')
66
option('zlib', type: 'feature', value: 'auto', description: 'Enable zlib support')
77
option('brotli', type: 'feature', value: 'auto', description: 'Enable Brotli support')
8+
option('zstd', type: 'feature', value: 'auto', description: 'Enable zstd support')
89
option('macosx_keychain', type: 'feature', value: 'auto', description: 'Enable loading certs from the Keychain on Apple devices')
910
option('non_blocking_getaddrinfo', type: 'feature', value: 'auto', description: 'Enable asynchronous name lookup')
1011
option('compile', type: 'boolean', value: false, description: 'Split the header into a compilable header & source file (requires python3)')

0 commit comments

Comments
 (0)