diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2017-06-08 12:29:01 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2017-06-09 09:18:06 +0000 |
commit | 2296df32fe13cde7b8a17ae7e72cddcb328ae311 (patch) | |
tree | cb2d248ccf6a6314231c87761f9b566b73440d87 /mkspecs | |
parent | 884a4202a8fca7b7626f52b0c26d71acd085ca7e (diff) | |
download | qtivi-2296df32fe13cde7b8a17ae7e72cddcb328ae311.tar.gz |
ivigenerator: Fix the qmake integration on windows
We need to depend on debug_and_release for windows
and return an error if it has been disabled.
This is needed as NMAKE doesn't support the Makefile
target and it's own reevaluation, which is needed
for the normal qmake integration to work.
The workaround is based on the fact that sub Makefiles
are generated and we can run the generator and
qmake before NMAKE is reading them.
Change-Id: I68282bbe25899b5f67be7822e6fca419a34c4318
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/ivigenerator.prf | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mkspecs/features/ivigenerator.prf b/mkspecs/features/ivigenerator.prf index dfb2d41..eba0bdc 100644 --- a/mkspecs/features/ivigenerator.prf +++ b/mkspecs/features/ivigenerator.prf @@ -15,6 +15,11 @@ isEmpty(QFACE_SOURCES): error("QFACE_SOURCES must be set!") error("Invalid qface file provided: The file needs to end with .qface") } +# See the win32 section, why this is needed +win32:!contains(CONFIG, debug_and_release) { + error("The ivigenerator works only in the debug_and_release configuration on windows") +} + QFACE_PWD = $$dirname(QFACE_SOURCES) QFACE_ABS_PWD = $$absolute_path($$QFACE_PWD, $$_PRO_FILE_PWD_) QFACE_FILE = $$basename(QFACE_SOURCES) @@ -80,3 +85,24 @@ exists($$PRI) { } QMAKE_EXTRA_TARGETS += Makefile qface_sources + +# NMAKE doesn't support the Makefile target to call qmake and reevaluate itself +# Because of that, the autogeneration is not started at all and if started +# qmake is not run and the Makefile revaluated... +# To workaround this, we depend on debug_and_release as a meta Makefile is generated +# where we can envorce the run of the generator and qmake. +# Afterwards the sub makefiles are read (Makefile.debug/release), which have been +# regenerated before starting NMAKE on them. +win32 { + qmake.depends = $$relative_path($$PRI, $$OUT_PWD) + + debug.depends = qmake + debug-make_first.depends = qmake + debug-all.depends = qmake + release.depends = qmake + release-make_first.depends = qmake + release-all.depends = qmake + QMAKE_EXTRA_TARGETS += debug debug-make_first debug-all \ + release release-make_first release-all \ + qmake +} |