summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2019-09-29 00:31:33 +0200
committerMaciej S. Szmigiero <mail@maciej.szmigiero.name>2019-09-29 00:46:25 +0200
commitfd1369d8fcda295af879e5db5e28099881f6ca4a (patch)
tree2d45a6f2d896ed00d76705d6149a8f53e13f525b
parentca76b9b5513f0548361ebb01f87edc45f3ad89d6 (diff)
Make sure main/qtpass actually depends on libqtpass.a
Currently, if one changes some source file in src and then runs make the libqtpass.a gets correctly rebuilt, however main/qtpass isn't actually relinked to make use of this new library version. According to the qmake project file snippet at the very bottom of https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html internal static libraries need to be manually added to their users PRE_TARGETDEPS, too. The same goes for tests that link to libqtpass.a.
-rw-r--r--main/main.pro2
-rw-r--r--tests/auto/ui/ui.pro1
-rw-r--r--tests/auto/util/util.pro1
3 files changed, 4 insertions, 0 deletions
diff --git a/main/main.pro b/main/main.pro
index 515dfcf9..64cf8200 100644
--- a/main/main.pro
+++ b/main/main.pro
@@ -5,6 +5,8 @@ QT += core gui
CONFIG += c++11
LIBS = -L"$$OUT_PWD/../src/$(OBJECTS_DIR)" -lqtpass $$LIBS
+clang|gcc:PRE_TARGETDEPS += "$$OUT_PWD/../src/$(OBJECTS_DIR)/libqtpass.a"
+
INCLUDEPATH += ../src
macx {
diff --git a/tests/auto/ui/ui.pro b/tests/auto/ui/ui.pro
index a7324599..7949d49a 100644
--- a/tests/auto/ui/ui.pro
+++ b/tests/auto/ui/ui.pro
@@ -3,6 +3,7 @@
SOURCES += tst_ui.cpp
LIBS = -L"$$OUT_PWD/../../../src/$(OBJECTS_DIR)" -lqtpass $$LIBS
+clang|gcc:PRE_TARGETDEPS += "$$OUT_PWD/../../../src/$(OBJECTS_DIR)/libqtpass.a"
HEADERS += passworddialog.h \
passwordconfiguration.h
diff --git a/tests/auto/util/util.pro b/tests/auto/util/util.pro
index 89aa15be..41fd89cb 100644
--- a/tests/auto/util/util.pro
+++ b/tests/auto/util/util.pro
@@ -3,6 +3,7 @@
SOURCES += tst_util.cpp \
LIBS = -L"$$OUT_PWD/../../../src/$(OBJECTS_DIR)" -lqtpass $$LIBS
+clang|gcc:PRE_TARGETDEPS += "$$OUT_PWD/../../../src/$(OBJECTS_DIR)/libqtpass.a"
HEADERS += util.h \
filecontent.h