blob: 1d8221b97b7dd6aca56385e7e6794101bb395872 (
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
|
import qbs
import qbs.FileInfo
import qbs.TextFile
Project {
property string hostProfile
property string targetProfile
Product {
name: "p1"
type: "output"
profiles: [project.targetProfile, project.hostProfile]
Group {
files: "host+target.input"
fileTags: "input"
}
}
Product {
name: "p2"
type: "output"
profiles: project.hostProfile
Group {
files: "host-tool.input"
fileTags: "input"
}
}
Rule {
inputs: "input"
Artifact {
fileName: FileInfo.baseName(input.fileName) + ".output"
fileTags: "output"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "generating " + output.fileName;
cmd.sourceCode = function() {
var file = new TextFile(output.filePath, TextFile.WriteOnly);
file.write(product.moduleProperty("qbs", "architecture"));
file.close();
}
return cmd;
}
}
}
|