1
0
mirror of synced 2025-12-17 04:02:14 +03:00

Add Zstd support through meson (#2293)

* Add Zstd support through meson

* Add libzstd-dev to abitest
This commit is contained in:
Jean-Francois Simoneau
2025-12-13 23:55:58 -05:00
committed by GitHub
parent b7097f1386
commit 2de4c59bc2
3 changed files with 8 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ jobs:
git git
libbrotli-dev libbrotli-dev
libssl-dev libssl-dev
libzstd-dev
meson meson
pkg-config pkg-config
python3 python3

View File

@@ -74,6 +74,12 @@ if brotli_found_all
args += '-DCPPHTTPLIB_BROTLI_SUPPORT' args += '-DCPPHTTPLIB_BROTLI_SUPPORT'
endif endif
zstd_dep = dependency('libzstd', required: get_option('zstd'))
if zstd_dep.found()
deps += zstd_dep
args += '-DCPPHTTPLIB_ZSTD_SUPPORT'
endif
async_ns_opt = get_option('non_blocking_getaddrinfo') async_ns_opt = get_option('non_blocking_getaddrinfo')
if host_machine.system() == 'windows' if host_machine.system() == 'windows'

View File

@@ -5,6 +5,7 @@
option('openssl', type: 'feature', value: 'auto', description: 'Enable OpenSSL support') option('openssl', type: 'feature', value: 'auto', description: 'Enable OpenSSL support')
option('zlib', type: 'feature', value: 'auto', description: 'Enable zlib support') option('zlib', type: 'feature', value: 'auto', description: 'Enable zlib support')
option('brotli', type: 'feature', value: 'auto', description: 'Enable Brotli support') option('brotli', type: 'feature', value: 'auto', description: 'Enable Brotli support')
option('zstd', type: 'feature', value: 'auto', description: 'Enable zstd support')
option('macosx_keychain', type: 'feature', value: 'auto', description: 'Enable loading certs from the Keychain on Apple devices') option('macosx_keychain', type: 'feature', value: 'auto', description: 'Enable loading certs from the Keychain on Apple devices')
option('non_blocking_getaddrinfo', type: 'feature', value: 'auto', description: 'Enable asynchronous name lookup') option('non_blocking_getaddrinfo', type: 'feature', value: 'auto', description: 'Enable asynchronous name lookup')
option('compile', type: 'boolean', value: false, description: 'Split the header into a compilable header & source file (requires python3)') option('compile', type: 'boolean', value: false, description: 'Split the header into a compilable header & source file (requires python3)')