From 3774344bb7e270d14a5c5bda002f1db2fa26a20c Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Thu, 22 Dec 2022 11:39:57 +0100 Subject: tests: Test support for pkg-config --- tests/test_cases/deps/TARGETS | 10 ++++++++++ tests/test_cases/deps/shared/TARGETS | 5 +++++ 2 files changed, 15 insertions(+) (limited to 'tests/test_cases') diff --git a/tests/test_cases/deps/TARGETS b/tests/test_cases/deps/TARGETS index 93aa167..fa6ef0b 100644 --- a/tests/test_cases/deps/TARGETS +++ b/tests/test_cases/deps/TARGETS @@ -61,6 +61,7 @@ , "+test_uses_baz" , "+test_uses_main" , "+test_diamond" + , "+install_foo" , "+install_bar_s" , "+install_baz" , "+install_main" @@ -71,10 +72,19 @@ , "test -f bar/libbar.so" , "test -f bar/bar/bar.hpp" , "! test -f bar/foo/foo.hpp" + , "test -f install_foo/lib/libfoo.so.1.2.3" + , "test -f install_foo/include/foo/foo.hpp" + , "grep 'Name: foo' install_foo/share/pkgconfig/foo.pc" + , "grep 'Version: 1.2.3' install_foo/share/pkgconfig/foo.pc" + , "grep -- '-L${libdir}' install_foo/share/pkgconfig/foo.pc" + , "grep -- '-l:libfoo.so.1.2.3' install_foo/share/pkgconfig/foo.pc" , "test -f install_bar_s/lib/bar/libbar.a" , "test -f install_bar_s/include/bar/bar.hpp" , "test -f install_bar_s/lib/libfoo.so.1.2.3" , "! test -f install_bar_s/include/foo/foo.hpp" + , "grep 'Name: bar' install_bar_s/share/pkgconfig/bar.pc" + , "grep '${libdir}/bar/libbar.a' install_bar_s/share/pkgconfig/bar.pc" + , "grep '${libdir}/libfoo.so.1.2.3' install_bar_s/share/pkgconfig/bar.pc" , "test -f install_baz/lib/libbaz.so" , "test -f install_baz/include/baz/baz.hpp" , "! test -f install_baz/lib/foo/libfoo.a" diff --git a/tests/test_cases/deps/shared/TARGETS b/tests/test_cases/deps/shared/TARGETS index f89ce0a..9db7fb8 100644 --- a/tests/test_cases/deps/shared/TARGETS +++ b/tests/test_cases/deps/shared/TARGETS @@ -88,6 +88,11 @@ , "srcs": ["test_diamond.cpp"] , "private-deps": ["foo_s", "baz"] } +, "install_foo": + { "type": ["@", "rules", "CC", "install-with-deps"] + , "targets": ["foo"] + , "flat-libs": ["yes"] + } , "install_bar_s": {"type": ["@", "rules", "CC", "install-with-deps"], "targets": ["bar_s"]} , "install_baz": -- cgit v1.2.3