forked from qt-creator/qt-creator
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathqtcreator.qbs
56 lines (53 loc) · 1.91 KB
/
qtcreator.qbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import qbs 1.0
import qbs.Environment
import qbs.FileInfo
Project {
name: "Qt Creator"
minimumQbsVersion: "1.5.0"
property bool withAutotests: qbs.buildVariant === "debug"
property string licenseType: "opensource"
property path ide_source_tree: path
property pathList additionalPlugins: []
property pathList additionalLibs: []
property pathList additionalTools: []
property pathList additionalAutotests: []
property string sharedSourcesDir: path + "/src/shared"
qbsSearchPaths: "qbs"
references: [
"doc/doc.qbs",
"src/src.qbs",
"share/share.qbs",
"share/qtcreator/translations/translations.qbs",
"tests/tests.qbs"
]
AutotestRunner {
Depends { name: "Qt.core" }
Depends { name: "qtc" }
environment: {
var env = base;
if (!qbs.hostOS.contains("windows") || !qbs.targetOS.contains("windows"))
return env;
var path = "";
for (var i = 0; i < env.length; ++i) {
if (env[i].startsWith("PATH=")) {
path = env[i].substring(5);
break;
}
}
var fullQtcInstallDir
= FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, qbs.InstallDir);
var fullLibInstallDir = FileInfo.joinPaths(fullQtcInstallDir,
product.moduleProperty("ide", "ide_library_path"));
var fullPluginInstallDir = FileInfo.joinPaths(fullQtcInstallDir,
product.moduleProperty("qtc", "ide_plugin_path"));
path = Qt.core.binPath + ";" + fullLibInstallDir + ";" + fullPluginInstallDir
+ ";" + path;
var arrayElem = "PATH=" + path;
if (i < env.length)
env[i] = arrayElem;
else
env.push(arrayElem);
return env;
}
}
}