From ef0221bc954a6341bd172950d1e163d35d472f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 10 Apr 2017 17:35:55 -0400 Subject: [PATCH] meson: link test-lib{systemd,udev}-sym in the usual way I tried to link to the right library by hand, because without mesonbuid/meson#1545, libbasic.a is added to the link arguments. We want to link the test with nothing but the library being tested. Doing the linking by hand did achieve that, but it caused a bigger issue: meson didn't know about the dependency on the library. And the dependency cannot be added using link_depends, because "link_depends arguments must be strings...", and this does not work with a compilation target. So just link in the usual way and accept the overlinking (for now). --- meson.build | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 3f53b8a7e2..9d253590e3 100644 --- a/meson.build +++ b/meson.build @@ -2000,11 +2000,7 @@ test_libsystemd_sym = executable( 'test-libsystemd-sym', test_libsystemd_sym_c, include_directories : includes, - # link_with : [libsystemd], - # TODO: try again with https://github.com/mesonbuild/meson/pull/1545 - link_args : ['libsystemd.so.0.18.0'], - # link_depends : [libsystemd], - # TODO: try again after "Link_depends arguments must be strings." is solved + link_with : [libsystemd], install : install_tests, install_dir : testsdir) test('test-libsystemd-sym', @@ -2015,7 +2011,7 @@ test_libudev_sym = executable( test_libudev_sym_c, include_directories : includes, c_args : ['-Wno-deprecated-declarations'], - link_args : ['src/libudev/libudev.so.1.6.6'], + link_with : [libudev], install : install_tests, install_dir : testsdir) test('test-libudev-sym',