diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-12-30 15:24:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-30 15:50:46 +0100 |
commit | 6d8aa2aec81abf4935c72745790bc5f9bf7541b9 (patch) | |
tree | b9d0e0cbd30923b5cdb24758c1794e5280f08d15 | |
parent | meson: require SecurityFramework when it's used as SHA1 backend (diff) | |
download | git-6d8aa2aec81abf4935c72745790bc5f9bf7541b9.tar.xz git-6d8aa2aec81abf4935c72745790bc5f9bf7541b9.zip |
meson: simplify conditions for HTTPS and SHA1 dependencies
The conditions used to figure out whteher the Security framework or
OpenSSL library is required are a bit convoluted because they can be
pulled in via the HTTPS, SHA1 or SHA256 backends. Refactor them to be
easier to read.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | meson.build | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meson.build b/meson.build index bc75ad954a..46f807899b 100644 --- a/meson.build +++ b/meson.build @@ -1329,13 +1329,13 @@ https_backend = get_option('https_backend') sha1_backend = get_option('sha1_backend') sha256_backend = get_option('sha256_backend') -security_framework = dependency('Security', required: https_backend == 'CommonCrypto' or sha1_backend == 'CommonCrypto') +security_framework = dependency('Security', required: 'CommonCrypto' in [https_backend, sha1_backend]) core_foundation_framework = dependency('CoreFoundation', required: security_framework.found()) if https_backend == 'auto' and security_framework.found() https_backend = 'CommonCrypto' endif -openssl_required = https_backend == 'openssl' or sha1_backend == 'openssl' or sha256_backend == 'openssl' +openssl_required = 'openssl' in [https_backend, sha1_backend, sha256_backend] openssl = dependency('openssl', required: openssl_required, default_options: ['default_library=static']) if https_backend == 'auto' and openssl.found() https_backend = 'openssl' |