[libsoup/autobahn-integration-new: 12/24] meson.build: Link test-utils




commit cc3b67866c8631fe7940cf453d576e758bd0132e
Author: Diego Pino Garcia <dpino igalia com>
Date:   Tue Jan 26 22:41:06 2021 +0800

    meson.build: Link test-utils

 tests/autobahn/meson.build | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/tests/autobahn/meson.build b/tests/autobahn/meson.build
index c308f333..9c158ad2 100644
--- a/tests/autobahn/meson.build
+++ b/tests/autobahn/meson.build
@@ -1,8 +1,26 @@
+test_utils_name = 'test-utils'
+installed_tests_execdir = join_paths(get_option('libexecdir'), 'installed-tests', libsoup_api_name)
+installed_tests_enabled = get_option('installed_tests')
+abs_installed_tests_execdir = join_paths(prefix, installed_tests_execdir)
+
+if cc.get_id() == 'msvc'
+  test_utils = static_library(test_utils_name, '../' + test_utils_name + '.c',
+    dependencies : libsoup_static_dep)
+else
+  test_utils = library(test_utils_name, '../' + test_utils_name + '.c',
+    dependencies : libsoup_static_dep,
+    install : installed_tests_enabled,
+    install_dir : installed_tests_execdir,
+  )
+endif
+
 deps = [
   glib_deps,
   libsoup_dep
 ]
 
-client = executable('soup-autobahn-test-client', 'soup-autobahn-test-client.c', dependencies: deps)
-
+client = executable('soup-autobahn-test-client', 'soup-autobahn-test-client.c',
+    dependencies: deps,
+    link_with : test_utils
+)
 test('soup-autobahn-test-client', client, suite: 'autobahn', timeout: 3600)


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