[glib-networking/wip/tingping/dont-build-mock] build: Don't build mock PKCS #11 module on unsupported backends



commit 30b4a111592bdd8e51664c79273ca4501d9ac1af
Author: Patrick Griffis <pgriffis igalia com>
Date:   Thu Oct 17 09:01:09 2019 -0400

    build: Don't build mock PKCS #11 module on unsupported backends

 tls/tests/meson.build | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/tls/tests/meson.build b/tls/tests/meson.build
index 729a9cd..ec524c2 100644
--- a/tls/tests/meson.build
+++ b/tls/tests/meson.build
@@ -21,15 +21,19 @@ envs = [
   'G_TEST_BUILDDIR=' + meson.current_build_dir(),
 ]
 
-mock_pkcs11_module = shared_module('mock-pkcs11',
-  sources: 'mock-pkcs11.c',
-  name_prefix: '',
-  gnu_symbol_visibility: 'hidden',
-  dependencies: [
-    gio_dep,
-    gnutls_dep,
-  ]
-)
+if backends.contains('gnutls')
+  mock_pkcs11_module = shared_module('mock-pkcs11',
+    sources: 'mock-pkcs11.c',
+    name_prefix: '',
+    gnu_symbol_visibility: 'hidden',
+    dependencies: [
+      gio_dep,
+      gnutls_dep,
+    ]
+  )
+else
+  mock_pkcs11_module = []
+endif
 
 test_programs = [
   ['certificate', [], deps, [], [mock_pkcs11_module]],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]