forked from qt-creator/qt-creator
Fix qbs build.
There was more stuff broken by the switch to Qt Quick 2 than were originally noticed, and the original fix was buggy as well. Change-Id: I2b3e0619af923c52aba809355ac271b67097adf1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
@@ -9,3 +9,16 @@ function qtLibraryName(qbs, name)
|
|||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function versionIsAtLeast(actualVersion, expectedVersion)
|
||||||
|
{
|
||||||
|
var actualVersionParts = actualVersion.split('.').map(function(item) { return parseInt(item, 10); });
|
||||||
|
var expectedVersionParts = expectedVersion.split('.').map(function(item) { return parseInt(item, 10); });
|
||||||
|
for (var i = 0; i < expectedVersionParts.length; ++i) {
|
||||||
|
if (actualVersionParts[i] > expectedVersionParts[i])
|
||||||
|
return true;
|
||||||
|
if (actualVersionParts[i] < expectedVersionParts[i])
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return i === expectedVersionParts.length || expectedVersionParts[i] === 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ Product {
|
|||||||
property var pluginspecreplacements
|
property var pluginspecreplacements
|
||||||
property var pluginRecommends: []
|
property var pluginRecommends: []
|
||||||
|
|
||||||
|
Depends { name: "Qt.core" }
|
||||||
|
property string minimumQtVersion: "4.8"
|
||||||
|
condition: Defaults.versionIsAtLeast(Qt.core.version, minimumQtVersion)
|
||||||
|
|
||||||
targetName: Defaults.qtLibraryName(qbs, name)
|
targetName: Defaults.qtLibraryName(qbs, name)
|
||||||
destinationDirectory: project.ide_plugin_path + '/' + provider
|
destinationDirectory: project.ide_plugin_path + '/' + provider
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import qbs
|
|||||||
|
|
||||||
Project {
|
Project {
|
||||||
name: "Plugins"
|
name: "Plugins"
|
||||||
property bool buildWelcomePlugin: Qt.core.versionMajor >= 5
|
|
||||||
|
|
||||||
references: [
|
references: [
|
||||||
"analyzerbase/analyzerbase.qbs",
|
"analyzerbase/analyzerbase.qbs",
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import qbs.base 1.0
|
import qbs.base 1.0
|
||||||
|
|
||||||
|
import "../../../qbs/defaults.js" as Defaults
|
||||||
import "../QtcPlugin.qbs" as QtcPlugin
|
import "../QtcPlugin.qbs" as QtcPlugin
|
||||||
|
|
||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "ProjectExplorer"
|
name: "ProjectExplorer"
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script", "quick"] }
|
Depends { name: "Qt"; submodules: ["core", "widgets", "xml", "network", "script"] }
|
||||||
|
Depends { name: "Qt.quick"; condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1"); }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "Locator" }
|
Depends { name: "Locator" }
|
||||||
Depends { name: "Find" }
|
Depends { name: "Find" }
|
||||||
@@ -140,7 +142,7 @@ QtcPlugin {
|
|||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "Project Welcome Page"
|
name: "Project Welcome Page"
|
||||||
condition: project.buildWelcomePlugin
|
condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1")
|
||||||
files: [
|
files: [
|
||||||
"projectwelcomepage.cpp",
|
"projectwelcomepage.cpp",
|
||||||
"projectwelcomepage.h"
|
"projectwelcomepage.h"
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ import "../QtcPlugin.qbs" as QtcPlugin
|
|||||||
|
|
||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "QmlProfiler"
|
name: "QmlProfiler"
|
||||||
|
minimumQtVersion: "5.1"
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "network", "qml", "quick"] }
|
Depends { name: "Qt"; submodules: ["widgets", "network"] }
|
||||||
|
Depends { name: "Qt.quick"; condition: product.condition; }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "AnalyzerBase" }
|
Depends { name: "AnalyzerBase" }
|
||||||
Depends { name: "QmlProjectManager" }
|
Depends { name: "QmlProjectManager" }
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import qbs.base 1.0
|
import qbs.base 1.0
|
||||||
|
|
||||||
|
import "../../../qbs/defaults.js" as Defaults
|
||||||
import "../QtcPlugin.qbs" as QtcPlugin
|
import "../QtcPlugin.qbs" as QtcPlugin
|
||||||
|
|
||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "QtSupport"
|
name: "QtSupport"
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "quick"] }
|
Depends { name: "Qt"; submodules: ["core", "widgets"]; }
|
||||||
|
Depends { name: "Qt.quick"; condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1"); }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "ProjectExplorer" }
|
Depends { name: "ProjectExplorer" }
|
||||||
Depends { name: "TextEditor" }
|
Depends { name: "TextEditor" }
|
||||||
@@ -112,7 +114,7 @@ QtcPlugin {
|
|||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "Getting Started Welcome Page"
|
name: "Getting Started Welcome Page"
|
||||||
condition: project.buildWelcomePlugin
|
condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1")
|
||||||
files: [
|
files: [
|
||||||
"gettingstartedwelcomepage.cpp",
|
"gettingstartedwelcomepage.cpp",
|
||||||
"gettingstartedwelcomepage.h"
|
"gettingstartedwelcomepage.h"
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import "../QtcPlugin.qbs" as QtcPlugin
|
|||||||
|
|
||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "Welcome"
|
name: "Welcome"
|
||||||
condition: project.buildWelcomePlugin
|
minimumQtVersion: "5.1"
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "network", "quick"] }
|
Depends { name: "Qt"; submodules: ["widgets", "network"] }
|
||||||
|
Depends { name: "Qt.quick"; condition: product.condition; }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "ProjectExplorer" }
|
Depends { name: "ProjectExplorer" }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user