blob: d656d0ed5df62105e2be1842590c93ac960c2281 (
plain)
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
57
58
59
60
61
62
63
|
import qbs
import qbs.File
import qbs.FileInfo
import qbs.TextFile
Project {
name: "Qt Creator Super Project"
qbsSearchPaths: ["qtcreator/qbs"]
// TODO: enable when we can require Qbs 1.8
// Probe {
// id: submodules
// property var modules: []
// configure: {
// var mods = [];
// var gitmodules = new TextFile(FileInfo.joinPaths(path, ".gitmodules"));
// var module = null;
// while (!gitmodules.atEof()) {
// var line = gitmodules.readLine();
// var modLine = line.match(/^\[submodule "([^"]+)"\]$/);
// if (modLine) {
// module = { _name: modLine[1] };
// mods.push(module);
// } else if (module) {
// var propLine = line.match(/^\t([^ =]+) *= *(.*)$/);
// if (propLine)
// module[propLine[1]] = propLine[2];
// else
// console.warn("Malformed line in .gitmodules: " + line);
// }
// }
// modules = mods;
// }
// }
SubProject {
filePath: "qtcreator/qtcreator.qbs"
Properties {
additionalPlugins: {
// TODO remove when we can use the Probe
var submodules = { modules: [
{ _name: "fossil", path: "plugins/fossil" }
]}
var plugins = [];
submodules.modules.forEach(function(module) {
var modulePath = module.path;
var qbsBase = FileInfo.fileName(modulePath);
if (qbsBase !== "qtcreator") { // skip qtcreator submodule
var file = FileInfo.joinPaths(path, modulePath, "plugins", qbsBase,
qbsBase + ".qbs");
if (!File.exists(file))
file = FileInfo.joinPaths(path, modulePath, qbsBase + ".qbs");
if (File.exists(file))
plugins.push(file);
}
});
return plugins;
}
}
}
}
|