Rename testlib folder to libnymea-tests

Fix multiple imports of QT libs by replacing "+=" with "*="
This commit is contained in:
Simon Stürz 2025-10-06 09:49:41 +02:00
parent d8dcff002c
commit 400fff6785
6 changed files with 15 additions and 15 deletions

View File

@ -77,7 +77,7 @@ INSTALLS += translations
QMAKE_EXTRA_TARGETS += lupdate lrelease QMAKE_EXTRA_TARGETS += lupdate lrelease
test.depends += lrelease test.depends += lrelease
test.commands = LD_LIBRARY_PATH=$$top_builddir/libnymea-core:$$top_builddir/libnymea:$$top_builddir/tests/testlib make check TESTRUNNER=\"dbus-test-runner --bus-type=both --task\" test.commands = LD_LIBRARY_PATH=$$top_builddir/libnymea-core:$$top_builddir/libnymea:$$top_builddir/tests/libnymea-tests make check TESTRUNNER=\"dbus-test-runner --bus-type=both --task\"
QMAKE_EXTRA_TARGETS += test QMAKE_EXTRA_TARGETS += test
# Show doc files in project tree # Show doc files in project tree

View File

@ -1,6 +1,6 @@
QT += dbus testlib network sql websockets QT *= dbus testlib network sql websockets
CONFIG += testcase CONFIG *= testcase
CONFIG += link_pkgconfig CONFIG *= link_pkgconfig
greaterThan(QT_MAJOR_VERSION, 5) { greaterThan(QT_MAJOR_VERSION, 5) {
qtHaveModule(serialbus) { qtHaveModule(serialbus) {
@ -32,17 +32,17 @@ PKGCONFIG += nymea-zigbee nymea-networkmanager nymea-mqtt
INCLUDEPATH += $$top_srcdir/libnymea \ INCLUDEPATH += $$top_srcdir/libnymea \
$$top_srcdir/libnymea-core \ $$top_srcdir/libnymea-core \
$$top_srcdir/tests/testlib/ \ $$top_srcdir/tests/libnymea-tests/ \
$$top_builddir $$top_builddir
LIBS += -L$$top_builddir/libnymea/ -lnymea \ LIBS += -L$$top_builddir/libnymea/ -lnymea \
-L$$top_builddir/libnymea-core/ -lnymea-core \ -L$$top_builddir/libnymea-core/ -lnymea-core \
-L$$top_builddir/tests/testlib/ -lnymea-tests \ -L$$top_builddir/tests/libnymea-tests/ -lnymea-tests \
-L$$top_builddir/plugins/mock/ \ -L$$top_builddir/plugins/mock/ \
-lssl -lcrypto -lnymea-remoteproxyclient -lssl -lcrypto -lnymea-remoteproxyclient
target.path = $$[QT_INSTALL_PREFIX]/share/tests/nymea/ target.path = $$[QT_INSTALL_PREFIX]/share/tests/nymea/
INSTALLS += target INSTALLS += target
test.commands = LD_LIBRARY_PATH=../../../libnymea:../../../libnymea-core/:../../testlib/ make check TESTRUNNER=\"dbus-test-runner --bus-type=both --task\" test.commands = LD_LIBRARY_PATH=../../../libnymea:../../../libnymea-core/:../../libnymea-tests/ make check TESTRUNNER=\"dbus-test-runner --bus-type=both --task\"
QMAKE_EXTRA_TARGETS += test QMAKE_EXTRA_TARGETS += test

View File

@ -3,22 +3,22 @@ TARGET = nymea-tests
include(../../nymea.pri) include(../../nymea.pri)
QT += testlib dbus network sql websockets QT *= dbus network sql websockets testlib
CONFIG += link_pkgconfig CONFIG *= link_pkgconfig
PKGCONFIG += nymea-zigbee PKGCONFIG *= nymea-zigbee
greaterThan(QT_MAJOR_VERSION, 5) { greaterThan(QT_MAJOR_VERSION, 5) {
qtHaveModule(serialbus) { qtHaveModule(serialbus) {
message("Building with QtSerialBus support.") message("Building with QtSerialBus support.")
QT += serialbus QT *= serialbus
DEFINES += WITH_QTSERIALBUS DEFINES *= WITH_QTSERIALBUS
} else { } else {
message("QtSerialBus package not found. Building without QtSerialBus support.") message("QtSerialBus package not found. Building without QtSerialBus support.")
} }
# Separate module in Qt6 # Separate module in Qt6
QT += concurrent QT *= concurrent
} else { } else {
packagesExist(Qt5SerialBus) { packagesExist(Qt5SerialBus) {
message("Building with QtSerialBus support.") message("Building with QtSerialBus support.")

View File

@ -1,4 +1,4 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS = testlib auto tools/simplepushbuttonhandler SUBDIRS = libnymea-tests auto tools/simplepushbuttonhandler
auto.depends += testlib auto.depends += libnymea-tests