blob: 5b9e12ebb45cfa904a23571679adbd46098c574e (
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
|
import qbs
import qbs.TextFile
Project {
property string libDir: sourceDirectory + "/libs"
StaticLibrary {
name: "lib1"
destinationDirectory: project.libDir
Depends { name: "cpp" }
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
files: ["lib1.cpp"]
}
StaticLibrary {
name: "lib2"
destinationDirectory: project.libDir
Depends { name: "cpp" }
Depends { name: "lib1" }
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
files: ["lib2.cpp"]
}
// TODO: Remove once we have parameterized dependencies
Product {
name: "barrier"
type: ["blubb"]
Depends { name: "lib1" }
Depends { name: "lib2" }
Rule {
multiplex: true
inputsFromDependencies: ["staticlibrary"]
Artifact {
filePath: "dummy"
fileTags: ["blubb"]
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.silent = true;
cmd.sourceCode = function() { }
return [cmd];
}
}
}
CppApplication {
Depends { name: "barrier" }
files: ["main.cpp"]
cpp.libraryPaths: [project.libDir]
cpp.staticLibraries: ["lib1", "lib2", "lib1"]
Rule {
inputsFromDependencies: ["blubb"]
Artifact {
filePath: "dummy.cpp"
fileTags: ["cpp"]
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.sourceCode = function() {
var f = new TextFile(output.filePath, TextFile.WriteOnly);
f.writeLine("void dummy() { }");
f.close();
};
return [cmd];
}
}
}
}
|