blob: b5ac8b2893c56824919e070426f5c413fb4e1085 (
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
import qbs.FileInfo
Project {
DynamicLibrary { // Product dependency, installed
name: "lib1"
Depends { name: "cpp" }
files: ["lib1.cpp"]
install: !qbs.targetOS.contains("darwin")
installImportLib: true
installDir: "lib1"
importLibInstallDir: installDir
Group {
condition: qbs.targetOS.contains("darwin")
fileTagsFilter: ["bundle.content"]
qbs.install: true
qbs.installSourceBase: destinationDirectory
}
}
DynamicLibrary { // Product dependency, non-installed
name: "lib2"
Depends { name: "cpp" }
Depends { name: "lib5" }
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
files: ["lib2.cpp"]
}
DynamicLibrary { // Non-dependency, referred to by full path
name: "lib3"
Depends { name: "cpp" }
files: ["lib3.cpp"]
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
install: true
installImportLib: true
installDir: "lib3"
importLibInstallDir: installDir
}
DynamicLibrary { // Non-dependency, referred to by name
name: "lib4"
Depends { name: "cpp" }
files: ["lib4.cpp"]
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
install: true
installImportLib: true
installDir: "lib4"
importLibInstallDir: installDir
}
DynamicLibrary { // Recursive product dependency
name: "lib5"
Depends { name: "cpp" }
Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
}
files: ["lib5.cpp"]
}
CppApplication {
name: "app"
consoleApplication: true
files: "main.cpp"
Depends { name: "lib1" }
Depends { name: "lib2" }
Depends { name: "lib3"; cpp.link: false }
Depends { name: "lib4"; cpp.link: false }
property string fullInstallPrefix: FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix)
property string lib3FilePath: FileInfo.joinPaths(fullInstallPrefix, "lib3",
cpp.dynamicLibraryPrefix + "lib3" + (qbs.toolchain.contains("msvc")
? ".lib" : cpp.dynamicLibrarySuffix))
cpp.dynamicLibraries: [lib3FilePath, "lib4"]
cpp.libraryPaths: FileInfo.joinPaths(fullInstallPrefix, "lib4")
}
Probe {
id: osPrinter
property bool isWindows: qbs.targetOS.contains("windows")
configure: {
console.info("is windows");
found = true;
}
}
}
|