-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathenvironment_plugs.qbs
43 lines (39 loc) · 1.19 KB
/
environment_plugs.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
import qbs
import qbs.Environment
import "BuildHelpers.js" as Funcs
Product{
name: "Environment"
Export {
Depends { name: "cpp" }
cpp.debugInformation: true
cpp.defines: {
var defines = []
return base.concat(defines)
}
cpp.cFlags: {
var flags = ["-MD","-zi"]
if(qbs.buildVariant === "release")
flags = flags.concat(["-O2"])
else
flags = flags.concat(["-O0"])
return flags
}
cpp.cxxFlags: {
var flags = base
if(qbs.toolchain.contains("msvc"))
flags = flags.concat(["/EHsc"])
else
flags = flags.concat([])
return flags
}
Properties{
condition: qbs.toolchain.contains("msvc")
cpp.linkerFlags: {
var libs = ["/DEBUG", "/INCREMENTAL:NO", "/ignore:4221", "/ignore:4099","/ignore:4075"]
return libs;
}
}
property bool usePrecompiledHeader : Funcs.getEnvOrDie("USE_PRECOMPILED_HEADER") == "1"
property string sqliteFolder: Funcs.getEnvOrDie("SQLITE_FOLDER")
}
}