blob: a1b58e3e3915209c6e661f8db060dfd3d30ddba8 (
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
|
import qbs
import qbs.FileInfo
Project {
CppApplication {
Depends { name: "coreutils" }
Depends { name: "Qt"; submodules: ["core", "gui", "widgets"] }
name: "window"
targetName: bundle.isBundle ? "Window" : "window"
files: ["main.cpp"]
property bool install: true
property string installDir: bundle.isBundle ? "Applications" : (qbs.targetOS.contains("windows") ? "" : "bin")
Group {
fileTagsFilter: ["application"]
qbs.install: install
qbs.installDir: bundle.isBundle ? FileInfo.joinPaths(installDir, FileInfo.path(bundle.executablePath)) : installDir
}
Group {
fileTagsFilter: ["aggregate_infoplist"]
qbs.install: install && bundle.isBundle && !bundle.embedInfoPlist
qbs.installDir: FileInfo.joinPaths(installDir, FileInfo.path(bundle.infoPlistPath))
}
Group {
fileTagsFilter: ["pkginfo"]
qbs.install: install && bundle.isBundle
qbs.installDir: FileInfo.joinPaths(installDir, FileInfo.path(bundle.pkgInfoPath))
}
}
DynamicLibrary {
Depends { name: "cpp" }
name: "coreutils"
targetName: bundle.isBundle ? "CoreUtils" : "coreutils"
files: ["coreutils.cpp", "coreutils.h"]
property bool install: true
property string installDir: bundle.isBundle ? "Library/Frameworks" : (qbs.targetOS.contains("windows") ? "" : "lib")
Group {
fileTagsFilter: ["dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_import"]
qbs.install: install
qbs.installDir: bundle.isBundle ? FileInfo.joinPaths(installDir, FileInfo.path(bundle.executablePath)) : installDir
}
Group {
fileTagsFilter: ["aggregate_infoplist"]
qbs.install: install && bundle.isBundle && !bundle.embedInfoPlist
qbs.installDir: FileInfo.joinPaths(installDir, FileInfo.path(bundle.infoPlistPath))
}
}
}
|