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



commit bbad543e7ecd99071a7277662f3d74616a15f1a1
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
    
    Fixes #101

 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]