mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-04-11 19:28:30 +00:00
28
meson.build
28
meson.build
@@ -39,11 +39,29 @@ endif
|
||||
deps = [dependency('threads')]
|
||||
args = []
|
||||
|
||||
openssl_dep = dependency('openssl', version: '>=3.0.0', required: get_option('openssl'))
|
||||
if openssl_dep.found()
|
||||
deps += openssl_dep
|
||||
args += '-DCPPHTTPLIB_OPENSSL_SUPPORT'
|
||||
if host_machine.system() == 'darwin'
|
||||
if get_option('tls').allowed()
|
||||
tls_found = false
|
||||
if get_option('tls_backend') == 'openssl'
|
||||
openssl_dep = dependency('openssl', version: '>=3.0.0', required: get_option('tls'))
|
||||
if openssl_dep.found()
|
||||
deps += openssl_dep
|
||||
args += '-DCPPHTTPLIB_OPENSSL_SUPPORT'
|
||||
tls_found = true
|
||||
endif
|
||||
else
|
||||
mbedtls_dep = dependency('mbedtls', required: get_option('tls'))
|
||||
mbedtlsx509_dep = dependency('mbedx509', required: get_option('tls'))
|
||||
mbedtlscrypto_dep = dependency('mbedcrypto', required: get_option('tls'))
|
||||
if mbedtls_dep.found() and mbedtlsx509_dep.found() and mbedtlscrypto_dep.found()
|
||||
deps += mbedtls_dep
|
||||
deps += mbedtlsx509_dep
|
||||
deps += mbedtlscrypto_dep
|
||||
args += '-DCPPHTTPLIB_MBEDTLS_SUPPORT'
|
||||
tls_found = true
|
||||
endif
|
||||
endif
|
||||
|
||||
if tls_found and host_machine.system() == 'darwin'
|
||||
macosx_keychain_dep = dependency('appleframeworks', modules: ['CFNetwork', 'CoreFoundation', 'Security'], required: get_option('macosx_keychain'))
|
||||
if macosx_keychain_dep.found()
|
||||
deps += macosx_keychain_dep
|
||||
|
||||
Reference in New Issue
Block a user