blob: f7bd4ecad8703a7641536118a4bed27004a33957 (
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
65
66
67
68
69
70
71
72
73
74
|
import qbs.TextFile
Project {
Product {
type: ["properties"]
Depends { name: "cpp" }
Rule {
multiplex: true
Artifact {
filePath: "properties.json"
fileTags: ["properties"]
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.outputFilePath = outputs.properties[0].filePath;
cmd.tc = product.qbs.toolchain;
cmd.sourceCode = function () {
var tf = new TextFile(outputFilePath, TextFile.WriteOnly);
try {
tf.writeLine(JSON.stringify({ "qbs.toolchain": tc }, undefined, 4));
} finally {
tf.close();
}
};
return [cmd];
}
}
}
StaticLibrary {
name : "testa"
files : [ "testa.s" ]
Depends { name: "cpp" }
condition: qbs.toolchain.contains("gcc")
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
}
StaticLibrary {
name : "testb"
files : [ "testb.S" ]
Depends { name: "cpp" }
condition: qbs.toolchain.contains("gcc")
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
}
StaticLibrary {
name : "testc"
files : [ "testc.sx" ]
Depends { name: "cpp" }
condition: qbs.toolchain.contains("gcc")
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
}
StaticLibrary {
name: "testd"
Group {
condition: product.condition
files: ["testd_" + qbs.architecture + ".asm"]
}
Depends { name: "cpp" }
condition: qbs.toolchain.contains("msvc")
&& (qbs.architecture === "x86" || qbs.architecture === "x86_64")
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
}
}
|