-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTwofold-Qt.qbs
155 lines (134 loc) · 5.86 KB
/
Twofold-Qt.qbs
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import CrossPlatformUtils
import qbs
import qbs.FileInfo
Project {
// Don't compile the unit tests
property bool noTest: (parent && parent.noTest !== undefined) ? parent.noTest : false
// Don't compile the benchmark
property bool noBenchmark: (parent && parent.noBenchmark !== undefined) ? parent.noBenchmark : false
// Don't compile the vendor code
property bool noVendor: false
// Don't compile the examples
property bool noExample: false
// Don't append the compiler signature to the target name e. g. "mylib{-msvc18.40629}-d.lib"
property bool noTargetNameCompiler: (parent && parent.noTargetNameCompiler !== undefined) ? parent.noTargetNameCompiler : false
// Don't append the build variant to the target name e. g. "mylib-msvc18.40629{-d}.lib"
property bool noTargetNameBuildVariant: (parent && parent.noTargetNameBuildVariant !== undefined) ? parent.noTargetNameBuildVariant : false
// Don't put the target os in the lib install directory e. g. "lib/{windows}-x86_64/"
property bool noLibInstallDirTargetOs: (parent && parent.noLibInstallDirTargetOs !== undefined) ? parent.noLibInstallDirTargetOs : false
// Don't put the architecture in the lib install directory e. g. "lib/windows{-x86_64}/"
property bool noLibInstallDirArchitecture: (parent && parent.noLibInstallDirArchitecture !== undefined) ? parent.noLibInstallDirArchitecture : false
// Relative path where to install all library relevant files like header and libraries.
property string installPrefix: (parent && parent.installPrefix !== undefined) ? parent.installPrefix : ""
minimumQbsVersion: "1.6"
qbsSearchPaths: [
"qbs/",
]
StaticLibrary {
id: twofold
name: "Twofold"
targetName: CrossPlatformUtils.libTargetName(twofold, "twofold", noTargetNameCompiler, noTargetNameBuildVariant)
version: "1.0.0"
files: [
"src/Twofold/Engine.cpp",
"src/Twofold/MessageHandler.cpp",
"src/Twofold/MessageHandlerChain.cpp",
"src/Twofold/PathTextFileLoader.cpp",
"src/Twofold/PreparedTemplateBuilder.cpp",
"src/Twofold/SourceMap.cpp",
"src/Twofold/intern/LineProcessor.cpp",
"src/Twofold/intern/PreparedJavascriptBuilder.cpp",
"src/Twofold/intern/QtScriptTargetBuilderApi.cpp",
"src/Twofold/intern/SourceMapTextBuilder.cpp",
"src/Twofold/intern/TextBuilder.cpp",
"src/Twofold/intern/Command/Include.cpp",
"src/Twofold/intern/Command/Missing.cpp",
"src/Twofold/intern/Line/Call.cpp",
"src/Twofold/intern/Line/Command.cpp",
"src/Twofold/intern/Line/InterpolateLine.cpp",
"src/Twofold/intern/Line/Interpolation.cpp",
"src/Twofold/intern/Line/Passtrough.cpp",
"src/Twofold/intern/Javascript/BraceCounter.cpp",
"src/Twofold/intern/find_last.h",
"src/Twofold/intern/LineProcessor.h",
"src/Twofold/intern/PreparedJavascriptBuilder.h",
"src/Twofold/intern/QCharHelper.h",
"src/Twofold/intern/QStringHelper.h",
"src/Twofold/intern/QtScriptTargetBuilderApi.h",
"src/Twofold/intern/SourceMapTextBuilder.h",
"src/Twofold/intern/TextBuilder.h",
"src/Twofold/intern/Command/Include.h",
"src/Twofold/intern/Command/Missing.h",
"src/Twofold/intern/Line/Call.h",
"src/Twofold/intern/Line/Command.h",
"src/Twofold/intern/Line/InterpolateLine.h",
"src/Twofold/intern/Line/Interpolation.h",
"src/Twofold/intern/Line/Passtrough.h",
"src/Twofold/intern/Javascript/BraceCounter.h",
"src/Twofold/Engine.h",
"src/Twofold/BacktraceFilePosition.h",
"src/Twofold/MessageHandler.h",
"src/Twofold/MessageHandlerChain.h",
"src/Twofold/PathTextFileLoader.h",
"src/Twofold/PreparedTemplateBuilder.h",
"src/Twofold/SourceMap.h",
"src/Twofold/TextLoader.h",
]
// Tag header files for installation, this is for now the best way to do it
FileTagger {
patterns: [
"Engine.h",
"BacktraceFilePosition.h",
"MessageHandler.h",
"MessageHandlerChain.h",
"PathTextFileLoader.h",
"PreparedTemplateBuilder.h",
"SourceMap.h",
"TextLoader.h",
]
fileTags: [ "main-header"]
}
Depends { name: "cpp" }
cpp.includePaths: [ "src/" ]
Depends { name: "Qt.script" }
Depends { name: "SourceMap" }
Group {
name: "Install"
qbs.install: true
qbs.installPrefix: project.installPrefix
Group {
name: "Header"
fileTagsFilter: "main-header"
qbs.installDir: FileInfo.joinPaths("include", product.name)
}
Group {
name: "Library"
fileTagsFilter: "staticlibrary"
qbs.installDir: FileInfo.joinPaths("lib", CrossPlatformUtils.libDir(product, product.noLibInstallDirTargetOs, product.noLibInstallDirArchitecture))
}
}
Group {
name: "Other files"
files: [
".buildbot.yml",
".gitmodules",
".travis.yml",
"CHANGES",
"LICENSE",
"NOTICE",
"README.md",
]
}
Export {
Depends { name: "Qt.script" }
Depends { name: "SourceMap" }
Depends { name: "cpp" }
cpp.includePaths: [ "src/" ]
}
}
references: [
"vendor/vendor.qbs",
"example/example.qbs",
"test/test.qbs",
]
}