summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxine Aubrey <maxeaubrey@gmail.com>2021-07-18 13:59:10 +0200
committerThomas Haller <thaller@redhat.com>2021-07-18 16:42:39 +0200
commitbdfaa4520ea32e9b7065b8dcb450166d5d634a06 (patch)
tree5de9b24e6891210655cac170e835615557058c46
parent9fcf532df3eed0b630e374ce81ab923ff76795ca (diff)
downloadNetworkManager-bdfaa4520ea32e9b7065b8dcb450166d5d634a06.tar.gz
build/meson: fix when crypto libraries are built
Only do so when the dependencies are found. Fixes: 243051a8a62a ('libnm/build: always compile both crypto backends if library available') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/934
-rw-r--r--src/libnm-core-impl/meson.build36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/libnm-core-impl/meson.build b/src/libnm-core-impl/meson.build
index 2b76961659..f175ea3b29 100644
--- a/src/libnm-core-impl/meson.build
+++ b/src/libnm-core-impl/meson.build
@@ -2,23 +2,27 @@
libnm_core_impl_inc = include_directories('.')
-libnm_crypto_nss = static_library(
- 'nm-crypto-nss',
- sources: 'nm-crypto-nss.c',
- dependencies: [
- libnm_core_public_dep,
- crypto_nss_dep,
- ],
-)
+if crypto_nss_dep.found()
+ libnm_crypto_nss = static_library(
+ 'nm-crypto-nss',
+ sources: 'nm-crypto-nss.c',
+ dependencies: [
+ libnm_core_public_dep,
+ crypto_nss_dep,
+ ],
+ )
+endif
-libnm_crypto_gnutls = static_library(
- 'nm-crypto-gnutls',
- sources: 'nm-crypto-gnutls.c',
- dependencies: [
- libnm_core_public_dep,
- crypto_gnutls_dep,
- ],
-)
+if crypto_gnutls_dep.found()
+ libnm_crypto_gnutls = static_library(
+ 'nm-crypto-gnutls',
+ sources: 'nm-crypto-gnutls.c',
+ dependencies: [
+ libnm_core_public_dep,
+ crypto_gnutls_dep,
+ ],
+ )
+endif
if crypto == 'nss'
libnm_crypto = libnm_crypto_nss