From 9160c4e8340fb8083ed45175fab8a8d04f5e2037 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Thu, 1 Jun 2017 23:40:35 +0200 Subject: 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 --- mkspecs/features/ivigenerator.prf | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mkspecs') 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) -- cgit v1.2.1