diff options
author | Diego Pino Garcia <dpino@igalia.com> | 2021-01-26 22:41:06 +0800 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2021-04-13 21:14:37 +0000 |
commit | cc3b67866c8631fe7940cf453d576e758bd0132e (patch) | |
tree | e1793478d62025d215b85c266181848ab1eb90d6 | |
parent | 92877095f757901c910886061161faa3c290dbd4 (diff) | |
download | libsoup-cc3b67866c8631fe7940cf453d576e758bd0132e.tar.gz |
meson.build: Link test-utils
-rw-r--r-- | tests/autobahn/meson.build | 22 |
1 files 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) |