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:
25
meson.build
25
meson.build
@@ -530,20 +530,23 @@ if polkit_agent_helper_1_path[0] != '/'
|
|||||||
endif
|
endif
|
||||||
config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path)
|
config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path)
|
||||||
|
|
||||||
|
crypto_nss_dep = dependency(
|
||||||
|
'nss',
|
||||||
|
required: false,
|
||||||
|
)
|
||||||
|
crypto_gnutls_dep = dependency(
|
||||||
|
'gnutls',
|
||||||
|
version: '>= 2.12',
|
||||||
|
required: false,
|
||||||
|
)
|
||||||
crypto = get_option('crypto')
|
crypto = get_option('crypto')
|
||||||
if crypto == 'nss'
|
if crypto == 'nss'
|
||||||
crypto_dep = dependency('nss', required: false)
|
assert(crypto_nss_dep.found(), 'Requires nss crypto support')
|
||||||
assert(crypto_dep.found(), 'Requires nss crypto support')
|
crypto_dep = crypto_nss_dep
|
||||||
elif crypto == 'gnutls'
|
|
||||||
crypto_dep = dependency(
|
|
||||||
'gnutls',
|
|
||||||
version: '>= 2.12',
|
|
||||||
required: false,
|
|
||||||
)
|
|
||||||
assert(crypto_dep.found(), 'Requires gnutls crypto support')
|
|
||||||
else
|
else
|
||||||
error('bug')
|
assert(crypto == 'gnutls', 'Unexpected setting "crypto=' + crypto + '"')
|
||||||
|
assert(crypto_gnutls_dep.found(), 'Requires gnutls crypto support')
|
||||||
|
crypto_dep = crypto_gnutls_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dbus_conf_dir = get_option('dbus_conf_dir')
|
dbus_conf_dir = get_option('dbus_conf_dir')
|
||||||
|
@@ -2,20 +2,39 @@
|
|||||||
|
|
||||||
libnm_core_impl_inc = include_directories('.')
|
libnm_core_impl_inc = include_directories('.')
|
||||||
|
|
||||||
# FIXME: compile both crypto backends.
|
libnm_crypto_nss = static_library(
|
||||||
libnm_crypto = static_library(
|
'nm-crypto-nss',
|
||||||
'nm-crypto',
|
sources: 'nm-crypto-nss.c',
|
||||||
sources: 'nm-crypto-@0@.c'.format(crypto),
|
|
||||||
dependencies: [
|
dependencies: [
|
||||||
libnm_core_public_dep,
|
libnm_core_public_dep,
|
||||||
crypto_dep,
|
|
||||||
libnm_glib_aux_dep_link,
|
libnm_glib_aux_dep_link,
|
||||||
|
crypto_nss_dep,
|
||||||
],
|
],
|
||||||
c_args: [
|
c_args: [
|
||||||
'-DG_LOG_DOMAIN="libnm"',
|
'-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(
|
libnm_core_settings_sources = files(
|
||||||
'nm-setting-6lowpan.c',
|
'nm-setting-6lowpan.c',
|
||||||
'nm-setting-8021x.c',
|
'nm-setting-8021x.c',
|
||||||
|
Reference in New Issue
Block a user