From 257d521cb9b7a163399662605ec8e994a736656f Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Fri, 16 Feb 2024 12:58:12 -0600 Subject: [PATCH] meson: Fix crypto option being silently ignored If you pass an option to enable a crypto backend it just silently moves on when nothing is found. This is not how a build system should behave and will lead to mistakes. The disabled option exists for that purpose. --- meson.build | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index d3ca2ce..baa1853 100644 --- a/meson.build +++ b/meson.build @@ -41,25 +41,19 @@ if get_option('crypto') == 'libgcrypt' gcrypt_dep = dependency( 'libgcrypt', version: '>=' + min_libgcrypt_version, - required: false, ) - if gcrypt_dep.found() - with_gcrypt = true - with_crypto = true - crypto_deps += gcrypt_dep - endif + with_gcrypt = true + with_crypto = true + crypto_deps += gcrypt_dep elif get_option('crypto') == 'gnutls' min_gnutls_version = '3.8.2' gnutls_dep = dependency( 'gnutls', version: '>=' + min_gnutls_version, - required: false, ) - if gnutls_dep.found() - with_gnutls = true - with_crypto = true - crypto_deps += gnutls_dep - endif + with_gnutls = true + with_crypto = true + crypto_deps += gnutls_dep endif min_tss2_version = '3.0.3'