From d2d5208819559069a9c8bdb6ac5bc43dfcc8e887 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 4 Apr 2018 13:12:41 +0200 Subject: [PATCH] qbs build: Enable the vcs module only for commercial plugins The other ones are in the Qt Creator source tree and should not get rebuilt on repo metadata changes, because they do not make use of QTC_PLUGIN_REVISION. Change-Id: I216a89de4411948b7ccad65f883d0d8782a283d4 Reviewed-by: Nikolai Kosjar --- qbs/imports/QtcCommercialPlugin.qbs | 1 + qbs/imports/QtcPlugin.qbs | 1 + qbs/modules/pluginjson/pluginjson.qbs | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qbs/imports/QtcCommercialPlugin.qbs b/qbs/imports/QtcCommercialPlugin.qbs index e3ef7a37570..712ad9f1574 100644 --- a/qbs/imports/QtcCommercialPlugin.qbs +++ b/qbs/imports/QtcCommercialPlugin.qbs @@ -3,4 +3,5 @@ import qbs QtcPlugin { Depends { name: "LicenseChecker"; required: false } cpp.defines: base.concat(LicenseChecker.present ? ["LICENSECHECKER"] : []) + pluginjson.useVcsData: true } diff --git a/qbs/imports/QtcPlugin.qbs b/qbs/imports/QtcPlugin.qbs index 7606b02504e..4fc7917c419 100644 --- a/qbs/imports/QtcPlugin.qbs +++ b/qbs/imports/QtcPlugin.qbs @@ -17,6 +17,7 @@ QtcProduct { Depends { name: "ExtensionSystem" } Depends { name: "pluginjson" } + pluginjson.useVcsData: false Depends { condition: qtc.testsEnabled name: "Qt.testlib" diff --git a/qbs/modules/pluginjson/pluginjson.qbs b/qbs/modules/pluginjson/pluginjson.qbs index f684dbccb4e..eccd53c85bd 100644 --- a/qbs/modules/pluginjson/pluginjson.qbs +++ b/qbs/modules/pluginjson/pluginjson.qbs @@ -10,9 +10,10 @@ Module { // TODO: Wrap the VCS specific stuff in a dedicated module property bool hasVcs: Utilities.versionCompare(qbs.version, "1.10") >= 0 - Depends { name: "vcs"; condition: hasVcs } + property bool useVcsData: hasVcs + Depends { name: "vcs"; condition: useVcsData } Properties { - condition: hasVcs + condition: useVcsData vcs.headerFileName: undefined vcs.repoDir: { // TODO: Could something like this be incorporated into the vcs module?