summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-10-28 10:24:39 -0400
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2021-11-01 21:05:11 +0000
commit574f44b4fe642fa2a73cb7de15395d56042f35da (patch)
tree03841c8d846e1c53ccc3a10b34606279d7ac2f0a
parentbddeefdf4566409f5f93f38222e47bb721138d6a (diff)
downloadlibnice-574f44b4fe642fa2a73cb7de15395d56042f35da.tar.gz
Fix error when crypto/ssl libs are found without pkg-config
In that case crypto_dep is a list and we can't call .found() method.
-rw-r--r--meson.build6
1 files changed, 4 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 30b565e..dbb01a8 100644
--- a/meson.build
+++ b/meson.build
@@ -209,7 +209,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,
@@ -239,10 +240,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'