blob: 7f620f3109d21dddbac6fb707851b9a9449cb833 (
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
64
|
Project {
CppApplication {
name: "tool"
consoleApplication: true
property bool _testPlatform: {
var result = qbs.targetPlatform === qbs.hostPlatform;
if (!result)
console.info("targetPlatform differs from hostPlatform");
return result;
}
Profile {
name: "debugProfile"
baseProfile: project.profile
qbs.buildVariant: "debug"
}
Profile {
name: "releaseProfile"
baseProfile: project.profile
qbs.buildVariant: "release"
}
multiplexByQbsProperties: "profiles"
qbs.profiles: ["debugProfile", "releaseProfile"]
files: "tool.cpp"
Properties {
condition: qbs.buildVariant === "debug"
cpp.defines: "WRONG_VARIANT"
}
Export {
Rule {
multiplex: true
inputsFromDependencies: "application"
Artifact {
filePath: "tool.out"
fileTags: "tool.output"
}
prepare: {
var cmd = new Command(input.filePath, []);
cmd.description = "creating " + output.fileName;
return cmd;
}
}
}
}
Product {
name: "p"
type: "tool.output"
multiplexByQbsProperties: "buildVariants"
qbs.buildVariants: ["debug", "release"]
Depends { name: "tool"; profiles: "releaseProfile" }
}
Product {
name: "p2"
type: "tool.output"
multiplexByQbsProperties: "buildVariants"
qbs.buildVariants: ["debug", "release"]
Depends { name: "helper" }
}
Product {
name: "helper"
Export {
Depends { name: "tool"; profiles: "releaseProfile" }
}
}
}
|