libnm/build: always compile both crypto backends if library available

We want to see that both backends can actually compile -- at least,
if we have the dependencies detected.
This commit is contained in:
Thomas Haller
2021-02-17 16:03:23 +01:00
parent fdf9614ba7
commit 243051a8a6
2 changed files with 38 additions and 16 deletions

View File

@@ -2,20 +2,39 @@
libnm_core_impl_inc = include_directories('.')
# FIXME: compile both crypto backends.
libnm_crypto = static_library(
'nm-crypto',
sources: 'nm-crypto-@0@.c'.format(crypto),
libnm_crypto_nss = static_library(
'nm-crypto-nss',
sources: 'nm-crypto-nss.c',
dependencies: [
libnm_core_public_dep,
crypto_dep,
libnm_glib_aux_dep_link,
crypto_nss_dep,
],
c_args: [
'-DG_LOG_DOMAIN="libnm"',
],
)
libnm_crypto_gnutls = static_library(
'nm-crypto-gnutls',
sources: 'nm-crypto-gnutls.c',
dependencies: [
libnm_core_public_dep,
libnm_glib_aux_dep_link,
crypto_gnutls_dep,
],
c_args: [
'-DG_LOG_DOMAIN="libnm"',
],
)
if crypto == 'nss'
libnm_crypto = libnm_crypto_nss
else
assert(crypto == 'gnutls', 'Unexpected setting "crypto=' + crypto + '"')
libnm_crypto = libnm_crypto_gnutls
endif
libnm_core_settings_sources = files(
'nm-setting-6lowpan.c',
'nm-setting-8021x.c',