summaryrefslogtreecommitdiff
path: root/mkspecs
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2017-06-01 23:40:35 +0200
committerRobert Griebl <robert.griebl@pelagicore.com>2017-06-02 15:22:12 +0000
commit9160c4e8340fb8083ed45175fab8a8d04f5e2037 (patch)
treeaa89c0d5bb2b0aba4ee9d51580994597c72a5e63 /mkspecs
parentaebc2b63d5b26eef1c81a52bc1bc128967eb4e37 (diff)
downloadqtivi-9160c4e8340fb8083ed45175fab8a8d04f5e2037.tar.gz
ivigenerator: Fix the Makefile errors when running inside QtCreator
The qmake_all step is already trying to call the generator even though it is not build yet. To fix the problem a dependency to a dummy file is created, which is touched once the generator is ready to be used. This will cause a rerun of the qmake for all project files which use the ivigenerator feature. Change-Id: I5a421597457dccc29ab48811a9d0588c04c5cf2b Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/ivigenerator.prf10
1 files changed, 10 insertions, 0 deletions
diff --git a/mkspecs/features/ivigenerator.prf b/mkspecs/features/ivigenerator.prf
index 346ade9..487dcbe 100644
--- a/mkspecs/features/ivigenerator.prf
+++ b/mkspecs/features/ivigenerator.prf
@@ -58,6 +58,16 @@ Makefile.target = $$MAKEFILE
# when using a QMAKE_EXTRA_COMPILER
Makefile.depends = $$relative_path($$qface_sources.output, $$OUT_PWD)
+# Make the qmake_all target work for usage inside QtCreator
+# Because of the Makefile target the generator is called before the actual Makefile
+# is evaluated. This is a problem if the virtualenv is not created yet.
+# In this case we create the target with a dependency to the forceRebuild file.
+# This file is created during the qmake run and updated once the virtualenv is ready
+# and will then cause a rerun of qmake
+!isEmpty(QTIVI_ROOT):!exists($$VIRTUALENV_PATH): {
+ Makefile.depends = $$shadowed($$IVI_GENERATOR_PATH)/forceRebuild
+}
+
# After the generation, this should exists and qmake can create the correct build tree
exists($$qface_sources.output) {
include($$qface_sources.output)