Fix error when crypto/ssl libs are found without pkg-config 42/271242/1
authorXavier Claessens <xavier.claessens@collabora.com>
Thu, 28 Oct 2021 14:24:39 +0000 (10:24 -0400)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 17 Feb 2022 05:16:37 +0000 (14:16 +0900)
In that case crypto_dep is a list and we can't call .found() method.

Change-Id: Ie63d78530d9a935312263bf9843f76667b17c4f6

meson.build

index 8cbc178..41aeb96 100644 (file)
@@ -207,7 +207,8 @@ else
   endif
 endif
 
-if not crypto_dep.found() and opt_cryptolib != 'gnutls'
+crypto_found = crypto_dep.found()
+if not crypto_found and opt_cryptolib != 'gnutls'
   # MSVC builds of OpenSSL does not generate pkg-config files,
   # so we check for it manually here in this case, if we can't find those files
   # Based on the CMake check for OpenSSL in CURL's CMakeLists.txt,
@@ -237,10 +238,11 @@ if not crypto_dep.found() and opt_cryptolib != 'gnutls'
 
   if libcrypto_dep.found() and libssl_dep.found()
     crypto_dep = [libcrypto_dep, libssl_dep]
+    crypto_found = true
   endif
 endif
 
-if not crypto_dep.found()
+if not crypto_found
   if opt_cryptolib == 'gnutls'
     error('GnuTLS requested as crypto library, but not found')
   elif opt_cryptolib == 'openssl'