diff options
-rw-r--r-- | meson.build | 25 | ||||
-rw-r--r-- | src/libnm-core-impl/meson.build | 29 |
2 files changed, 38 insertions, 16 deletions
diff --git a/meson.build b/meson.build index 8a42183594..1b114ef923 100644 --- a/meson.build +++ b/meson.build @@ -530,20 +530,23 @@ if polkit_agent_helper_1_path[0] != '/' endif 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') if crypto == 'nss' - crypto_dep = dependency('nss', required: false) - assert(crypto_dep.found(), 'Requires nss crypto support') -elif crypto == 'gnutls' - crypto_dep = dependency( - 'gnutls', - version: '>= 2.12', - required: false, - ) - assert(crypto_dep.found(), 'Requires gnutls crypto support') + assert(crypto_nss_dep.found(), 'Requires nss crypto support') + crypto_dep = crypto_nss_dep 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 dbus_conf_dir = get_option('dbus_conf_dir') diff --git a/src/libnm-core-impl/meson.build b/src/libnm-core-impl/meson.build index b4a257e9ec..15d8e2787e 100644 --- a/src/libnm-core-impl/meson.build +++ b/src/libnm-core-impl/meson.build @@ -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', |