summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2017-07-27 11:00:26 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2017-08-18 12:49:46 +0000
commit1369bb63ccfa6f5d3487d0a40c0644f7698030cb (patch)
tree6b633372ef2010b9db1779d393d6fd9943999726
parentd64de5aed436968492d35245545192b30138744b (diff)
downloadqtivi-1369bb63ccfa6f5d3487d0a40c0644f7698030cb.tar.gz
Use a better detection for the special qtci environment
Coin is doing a two stage build, which leads to problems for the virtualenv generation. Before we used the installed version when available, but this is problematic in the developer workflow when an existing qtivi installation already exists, as the installed (old) version is used instead of the new one. The QTEST_ENVIRONMENT environment variable is now used to detect whether we are in the special CI environment. Change-Id: I9d3d5d7f84c9f5e059897865c8cf7b30f8d84fda Reviewed-by: Mike Krus <mike.krus@kdab.com>
-rw-r--r--mkspecs/features/features.pro3
-rw-r--r--mkspecs/features/ivigenerator.prf16
-rw-r--r--src/tools/ivigenerator/ivigenerator.pro3
3 files changed, 13 insertions, 9 deletions
diff --git a/mkspecs/features/features.pro b/mkspecs/features/features.pro
index 10846b7..93814fe 100644
--- a/mkspecs/features/features.pro
+++ b/mkspecs/features/features.pro
@@ -1,6 +1,7 @@
TEMPLATE = aux
-prf.files = ivigenerator.prf
+prf.files = ivigenerator.prf \
+ ivigenerator_qt_module.prf
prf.path = $$[QT_HOST_DATA]/mkspecs/features
INSTALLS += prf
diff --git a/mkspecs/features/ivigenerator.prf b/mkspecs/features/ivigenerator.prf
index 89d8b9f..b2af78e 100644
--- a/mkspecs/features/ivigenerator.prf
+++ b/mkspecs/features/ivigenerator.prf
@@ -33,14 +33,15 @@ OTHER_FILES += $$QFACE_FILE
VIRTUALENV_PATH = $$[QT_HOST_BINS]/ivigenerator/qtivi_qface_virtualenv
INTERNAL_VIRTUALENV_PATH = $$QTIVI_BUILD_ROOT/src/tools/ivigenerator/qtivi_qface_virtualenv
IVI_GENERATOR_PATH = $$[QT_HOST_BINS]/ivigenerator
+QTEST_ENVIRONMENT = $$upper($$(QTEST_ENVIRONMENT))
# Try to use the internal virtualenv when building qtivi
# Because of the two stage build of COIN, it might not exist, but the installed version should still be there
-!isEmpty(QTIVI_BUILD_ROOT):exists($$INTERNAL_VIRTUALENV_PATH) {
+!isEmpty(QTIVI_BUILD_ROOT):!equals(QTEST_ENVIRONMENT, CI) {
VIRTUALENV_PATH = $$INTERNAL_VIRTUALENV_PATH
}
-!isEmpty(QTIVI_BUILD_ROOT):exists($$QTIVI_ROOT/src/tools/ivigenerator) {
+!isEmpty(QTIVI_BUILD_ROOT):!equals(QTEST_ENVIRONMENT, CI) {
IVI_GENERATOR_PATH = $$QTIVI_ROOT/src/tools/ivigenerator
}
@@ -95,14 +96,15 @@ Makefile.depends = $$relative_path($$PRI, $$OUT_PWD)
# 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): {
+!isEmpty(QTIVI_BUILD_ROOT):!exists($$VIRTUALENV_PATH): {
Makefile.depends = $$shadowed($$IVI_GENERATOR_PATH)/forceRebuild
+} else {
+ !isEmpty(QFACE_HEADERS_OUTPUT_TARGET) {
+ Makefile.depends += $$relative_path($$QFACE_HEADERS_OUTPUT_TARGET, $$OUT_PWD)
+ QMAKE_EXTRA_TARGETS += qface_headers
+ }
}
-!isEmpty(QFACE_HEADERS_OUTPUT_TARGET) {
- Makefile.depends += $$relative_path($$QFACE_HEADERS_OUTPUT_TARGET, $$OUT_PWD)
- QMAKE_EXTRA_TARGETS += qface_headers
-}
# After the generation, this should exists and qmake can create the correct build tree
exists($$PRI) {
diff --git a/src/tools/ivigenerator/ivigenerator.pro b/src/tools/ivigenerator/ivigenerator.pro
index 03ac59a..9cbea89 100644
--- a/src/tools/ivigenerator/ivigenerator.pro
+++ b/src/tools/ivigenerator/ivigenerator.pro
@@ -55,7 +55,8 @@ templates_generation_validator.path = $$[QT_HOST_BINS]/ivigenerator/templates_ge
generator.files += \
generate.py \
templates_frontend.yaml \
- templates_backend_simulator.yaml
+ templates_backend_simulator.yaml \
+ templates_generation_validator.yaml
generator.path = $$[QT_HOST_BINS]/ivigenerator
INSTALLS += templates_frontend templates_backend_simulator templates_generation_validator generator