blob: a5ff12eb20dc3c6d5c8f52fe00fdd1ca5bcd8288 (
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
|
import qbs 1.0
import qbs.TextFile
import qbs.FileInfo
Project {
Product {
type: "deps"
name: "product1"
Depends { name: "product2" }
Transformer {
Artifact {
fileTags: ["deps"]
fileName: product.name + '.deps'
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = 'generate ' + FileInfo.fileName(output.filePath);
cmd.highlight = 'codegen';
cmd.content = JSON.stringify(product.dependencies);
cmd.sourceCode = function() {
file = new TextFile(output.filePath, TextFile.WriteOnly);
file.truncate();
file.write(content);
file.close();
}
return cmd;
}
}
}
Product {
type: "application"
name: "product2"
property string narf: "zort"
Depends { name: "cpp" }
cpp.defines: ["SMURF"]
files: ["product2.cpp"]
}
}
|