diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-05-17 15:46:18 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-05-18 15:12:59 +0000 |
commit | 4e41d2509d9561946164637dcb8c7a8a3ecfa653 (patch) | |
tree | df871d756e9c82974446d16e3ef6c08ab49c0aa9 /mkspecs | |
parent | d25a8d402020b5ff525a4356745a2e1fefa00bd6 (diff) | |
download | qtivi-4e41d2509d9561946164637dcb8c7a8a3ecfa653.tar.gz |
Add support for additional annotation files
The ivigenerator as well as its qmake integration now support to pass
additional annotation files. This can be useful when annotations only
need to be applied for a specific part, e.g. the backend plugin.
This change also makes use of the feature in the autotests which now
use a no-private.yaml annotation file for testing the same qface file
as we use for our normal generation tests.
Task-number: QTAUTO-848
Change-Id: Ib626775d2339ebf2002bc689da8303e7caf6edfa
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/ivigenerator.prf | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mkspecs/features/ivigenerator.prf b/mkspecs/features/ivigenerator.prf index d4c49a5..8d36aae 100644 --- a/mkspecs/features/ivigenerator.prf +++ b/mkspecs/features/ivigenerator.prf @@ -7,6 +7,7 @@ # QFACE_MODULE_NAME = my_module_name # QFACE_FORMAT = frontend (or backend, simulator... -- defaults to "frontend") # QFACE_OUTPUT_DIR = my_output_dir (defaults to current build dir) +# QFACE_ANNOTATIONS += additional.yaml # QT_FOR_CONFIG += ivicore-private @@ -28,7 +29,7 @@ QFACE_ABS_PWD = $$absolute_path($$QFACE_PWD, $$_PRO_FILE_PWD_) QFACE_FILE = $$basename(QFACE_SOURCES) QFACE_BASE_NAME = $$replace(QFACE_FILE, .qface, ) QFACE_YAML = $$QFACE_ABS_PWD/$${QFACE_BASE_NAME}.yaml -OTHER_FILES += $$QFACE_FILE +OTHER_FILES += $$QFACE_ABS_PWD/$$QFACE_FILE # The 'click' library used by the generator needs to have a utf8 locale setup. equals(QMAKE_HOST.os, Windows): ENV = chcp 65001 && @@ -65,6 +66,13 @@ IVI_GENERATOR = $$VIRTUALENV_PYTHON $$IVI_GENERATOR_PATH/generate.py PRI = $$QFACE_OUTPUT_DIR/$$lower($${QFACE_BASE_NAME}).pri IVI_GENERATOR_OPTIONS = --format=$$QFACE_FORMAT --force !isEmpty(QFACE_MODULE_NAME): IVI_GENERATOR_OPTIONS += --module=$${QFACE_MODULE_NAME} +for (ANNOTATION, QFACE_ANNOTATIONS) { + file = $$absolute_path($$ANNOTATION, $$_PRO_FILE_PWD_) + + IVI_GENERATOR_OPTIONS += -A $$shell_path($$file) + qface_sources.depends += $$file + OTHER_FILES += $$file +} # Windows doesn't offer any other way to sleep for a time inside non-interactive scripts equals(QMAKE_HOST.os, Windows): SLEEP = ping -n 2 127.0.0.1 >nul |