From 966689ab499725cb7e7ab1157043b968a1a39e60 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Tue, 12 Oct 2021 15:33:04 +0300 Subject: pkgconfig: fix baseName detection Change-Id: I83691e0e35cf4bbf9955eb0bad58b5a15bf1779a Reviewed-by: Christian Kandeler --- tests/auto/pkgconfig/testdata/base.name.json | 20 ++++++++++++++++++++ tests/auto/pkgconfig/testdata/base.name.pc | 12 ++++++++++++ tests/auto/pkgconfig/tst_pkgconfig.cpp | 1 + 3 files changed, 33 insertions(+) create mode 100644 tests/auto/pkgconfig/testdata/base.name.json create mode 100644 tests/auto/pkgconfig/testdata/base.name.pc (limited to 'tests') diff --git a/tests/auto/pkgconfig/testdata/base.name.json b/tests/auto/pkgconfig/testdata/base.name.json new file mode 100644 index 000000000..a10e905ac --- /dev/null +++ b/tests/auto/pkgconfig/testdata/base.name.json @@ -0,0 +1,20 @@ +{ + "Name": "Base Name test", + "Description": "Checks correct baseName detection", + "Version": "1.0.0", + "Vars": { + "prefix": "/usr", + "exec_prefix": "/usr", + "libdir": "/usr/lib", + "includedir": "/usr/include" + }, + "Libs": [ + {"Type": "LibraryName", "Value": "simple"} + ], + "LibsPrivate": [ + {"Type": "LibraryName", "Value": "m"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/usr/include"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/base.name.pc b/tests/auto/pkgconfig/testdata/base.name.pc new file mode 100644 index 000000000..2bb3e275e --- /dev/null +++ b/tests/auto/pkgconfig/testdata/base.name.pc @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Base Name test +Description: Checks correct baseName detection +Version: 1.0.0 +Requires: +Libs: -lsimple +Libs.private: -lm +Cflags: -I${includedir} diff --git a/tests/auto/pkgconfig/tst_pkgconfig.cpp b/tests/auto/pkgconfig/tst_pkgconfig.cpp index b05dd4923..53dc696ed 100644 --- a/tests/auto/pkgconfig/tst_pkgconfig.cpp +++ b/tests/auto/pkgconfig/tst_pkgconfig.cpp @@ -166,6 +166,7 @@ void TestPkgConfig::pkgConfig_data() QTest::newRow("tilde") << QStringLiteral("tilde") << QVariantMap(); QTest::newRow("variables") << QStringLiteral("variables") << QVariantMap(); QTest::newRow("whitespace") << QStringLiteral("whitespace") << QVariantMap(); + QTest::newRow("base.name") << QStringLiteral("base.name") << QVariantMap(); } void TestPkgConfig::benchSystem() -- cgit v1.2.3