diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2017-06-06 10:42:34 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2017-06-09 09:18:03 +0000 |
commit | 884a4202a8fca7b7626f52b0c26d71acd085ca7e (patch) | |
tree | 9fd02689cc721dd81e40c7a5d7f13b98fd7e4ccd /mkspecs | |
parent | c4cb4af2bcc3b2a161c698a8458f94d2f2c5a2e8 (diff) | |
download | qtivi-884a4202a8fca7b7626f52b0c26d71acd085ca7e.tar.gz |
ivigenerator: Fix the generator to work with debug_and_release
extra compilers are only added to the config specific Makefiles
when building with debug_and_release.
Changing them to extra targets make them appear in the
meta makefile.
Change-Id: I85b72f6082bd42bfcfadd8afad8b5bb0f5e18d51
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/ivigenerator.prf | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mkspecs/features/ivigenerator.prf b/mkspecs/features/ivigenerator.prf index 87d7540..dfb2d41 100644 --- a/mkspecs/features/ivigenerator.prf +++ b/mkspecs/features/ivigenerator.prf @@ -38,11 +38,13 @@ win32: ENV = chcp 65001 && else: ENV = LC_ALL="utf-8" # TODO make this work with multiple input files, or only support one QFACE_SOURCE -qface_sources.output = $$QFACE_OUTPUT_DIR/$${QFACE_MODULE_NAME}.pri -qface_sources.commands = $$IVI_GENERATOR -f $$QFACE_FORMAT ${QMAKE_FILE_NAME} $$QFACE_OUTPUT_DIR -qface_sources.input = QFACE_SOURCES +# Although this could be extra_compiler it is a normal EXTRA_TARGET for a reason. +# In the debug_and_release configuration, we want to have the generator executed +# during the run of the meta Makefile to only generate the code once. +PRI = $$QFACE_OUTPUT_DIR/$${QFACE_MODULE_NAME}.pri +qface_sources.target = $$relative_path($$PRI, $$OUT_PWD) +qface_sources.commands = $$ENV $$IVI_GENERATOR -f $$QFACE_FORMAT $$QFACE_ABS_PWD/$${QFACE_FILE} $$QFACE_OUTPUT_DIR qface_sources.depends = $$IVI_GENERATOR_PATH/generate.py -qface_sources.CONFIG += target_predeps no_link # Add all templates of the generator format as dependency QFACE_TEMPLATE_PWD = $$IVI_GENERATOR_PATH/templates_$${QFACE_FORMAT} @@ -57,10 +59,10 @@ exists($$QFACE_YAML) { } # Reevaluate the Makefile after the generation has finished -Makefile.target = $$MAKEFILE +Makefile.target = Makefile # The relative_path is needed here as qmake will use a relative_path for the output files # when using a QMAKE_EXTRA_COMPILER -Makefile.depends = $$relative_path($$qface_sources.output, $$OUT_PWD) +Makefile.depends = $$relative_path($$PRI, $$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 @@ -73,9 +75,8 @@ Makefile.depends = $$relative_path($$qface_sources.output, $$OUT_PWD) } # After the generation, this should exists and qmake can create the correct build tree -exists($$qface_sources.output) { - include($$qface_sources.output) +exists($$PRI) { + include($$PRI) } -QMAKE_EXTRA_COMPILERS += qface_sources -QMAKE_EXTRA_TARGETS += Makefile +QMAKE_EXTRA_TARGETS += Makefile qface_sources |