From 1369bb63ccfa6f5d3487d0a40c0644f7698030cb Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Thu, 27 Jul 2017 11:00:26 +0200 Subject: 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 --- mkspecs/features/features.pro | 3 ++- mkspecs/features/ivigenerator.prf | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'mkspecs') 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) { -- cgit v1.2.1