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