aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-15 09:37:35 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-15 09:37:35 +0100
commitdf8f379ac98ec8ddfafde57f211959e3073fc0de (patch)
tree34ae6d0fd58904c1148a367e027017cfc96edb9c
parent227683b0116dce54502b081b8932781a20fe437a (diff)
downloadqtmips-df8f379ac98ec8ddfafde57f211959e3073fc0de.tar.gz
qtmips-df8f379ac98ec8ddfafde57f211959e3073fc0de.tar.bz2
qtmips-df8f379ac98ec8ddfafde57f211959e3073fc0de.zip
Switch to static libraries by default and ensure application rebuild when a library changes.
I have not found a way how to pass additional CONFIG options to Debian package build (dpkg-buildpackage) when qmake is invoked from debian/rules with debian helper based (dh) build. The way how qmake solves dependencies between program and libraries comes from stone age. It is necessary to include complete path to the library in PRE_TARGETDEPS definition including lib prefix and .a suffix. This is non portable and cannot be easily used when static and dynamic libraries build alternatives are considered. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-rw-r--r--qtmips_cli/qtmips_cli.pro2
-rw-r--r--qtmips_gui/qtmips_gui.pro3
-rw-r--r--qtmips_machine/qtmips_machine.pro1
-rw-r--r--qtmips_machine/tests/tests.pro2
-rw-r--r--qtmips_osemu/qtmips_osemu.pro1
5 files changed, 9 insertions, 0 deletions
diff --git a/qtmips_cli/qtmips_cli.pro b/qtmips_cli/qtmips_cli.pro
index c3394c9..8cacde6 100644
--- a/qtmips_cli/qtmips_cli.pro
+++ b/qtmips_cli/qtmips_cli.pro
@@ -13,6 +13,8 @@ else:unix: LIBS_SUBDIR = .
LIBS += -L$$OUT_PWD/../qtmips_machine/$${LIBS_SUBDIR} -lqtmips_machine -lelf
+PRE_TARGETDEPS += $$OUT_PWD/../qtmips_machine/$${LIBS_SUBDIR}/libqtmips_machine.a
+
DOLAR=$
unix: LIBS += \
diff --git a/qtmips_gui/qtmips_gui.pro b/qtmips_gui/qtmips_gui.pro
index d090b4d..905bdba 100644
--- a/qtmips_gui/qtmips_gui.pro
+++ b/qtmips_gui/qtmips_gui.pro
@@ -12,6 +12,9 @@ else:unix: LIBS_SUBDIR = .
LIBS += -L$$OUT_PWD/../qtmips_osemu/$${LIBS_SUBDIR} -lqtmips_osemu
LIBS += -L$$OUT_PWD/../qtmips_machine/$${LIBS_SUBDIR} -lqtmips_machine -lelf
+PRE_TARGETDEPS += $$OUT_PWD/../qtmips_osemu/$${LIBS_SUBDIR}/libqtmips_osemu.a
+PRE_TARGETDEPS += $$OUT_PWD/../qtmips_machine/$${LIBS_SUBDIR}/libqtmips_machine.a
+
DOLAR=$
unix: LIBS += \
diff --git a/qtmips_machine/qtmips_machine.pro b/qtmips_machine/qtmips_machine.pro
index 1332928..7223bcd 100644
--- a/qtmips_machine/qtmips_machine.pro
+++ b/qtmips_machine/qtmips_machine.pro
@@ -4,6 +4,7 @@ TARGET = qtmips_machine
CONFIG += c++11
TEMPLATE = lib
+CONFIG += staticlib
LIBS += -lelf
QMAKE_CXXFLAGS += -std=c++0x
diff --git a/qtmips_machine/tests/tests.pro b/qtmips_machine/tests/tests.pro
index 9486a2c..d98b9d0 100644
--- a/qtmips_machine/tests/tests.pro
+++ b/qtmips_machine/tests/tests.pro
@@ -14,6 +14,8 @@ else:unix: LIBS_SUBDIR = .
LIBS += -L$$OUT_PWD/../$${LIBS_SUBDIR} -lqtmips_machine -lelf
+PRE_TARGETDEPS += $$OUT_PWD/../$${LIBS_SUBDIR}/libqtmips_machine.a
+
DOLAR=$
unix: LIBS += \
diff --git a/qtmips_osemu/qtmips_osemu.pro b/qtmips_osemu/qtmips_osemu.pro
index 15ff961..5000eb7 100644
--- a/qtmips_osemu/qtmips_osemu.pro
+++ b/qtmips_osemu/qtmips_osemu.pro
@@ -4,6 +4,7 @@ TARGET = qtmips_osemu
CONFIG += c++11
TEMPLATE = lib
+CONFIG += staticlib
LIBS += -L$$OUT_PWD/../qtmips_machine/ -lqtmips_machine