forked from tibirna/qgit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqgit_project.qbs
More file actions
73 lines (61 loc) · 2.24 KB
/
qgit_project.qbs
File metadata and controls
73 lines (61 loc) · 2.24 KB
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
import qbs
import "qbs/imports/QbsUtl/qbsutl.js" as QbsUtl
Project {
name: "QGit (Project)"
minimumQbsVersion: "1.18.0"
qbsSearchPaths: ["qbs"]
readonly property string minimumQtVersion: "5.12.6"
readonly property bool conversionWarnEnabled: true
readonly property bool standaloneBuild: false
readonly property var projectVersion: projectProbe.projectVersion
readonly property string projectGitRevision: projectProbe.projectGitRevision
Probe {
id: projectProbe
property var projectVersion;
property string projectGitRevision;
readonly property string projectBuildDirectory: buildDirectory
readonly property string projectSourceDirectory: sourceDirectory
configure: {
projectVersion = QbsUtl.getVersions(projectSourceDirectory + "/VERSION");
projectGitRevision = QbsUtl.gitRevision(projectSourceDirectory);
//if (File.exists(projectBuildDirectory + "/package_build_info"))
// File.remove(projectBuildDirectory + "/package_build_info")
}
}
property var cppDefines: {
var def = [
"VERSION_PROJECT=\"" + projectVersion[0] + "\"",
"VERSION_PROJECT_MAJOR=" + projectVersion[1],
"VERSION_PROJECT_MINOR=" + projectVersion[2],
"VERSION_PROJECT_PATCH=" + projectVersion[3],
"GIT_REVISION=\"" + projectGitRevision + "\"",
];
if (qbs.buildVariant === "release")
def.push("NDEBUG");
if (qbs.targetOS.contains("windows")
&& qbs.toolchain && qbs.toolchain.contains("mingw"))
{
def.push("CONFIG_DIR=\"ProgramData/qgit/config\"");
}
else
def.push("CONFIG_DIR=\"~/.config/qgit\"");
return def;
}
property var cxxFlags: [
"-ggdb3",
//"-Winline",
"-Wall",
"-Wextra",
"-Wno-unused-parameter",
"-Wno-variadic-macros",
]
property string cxxLanguageVersion: "c++17"
references: [
"src/qgit.qbs",
"src/shared/shared.qbs",
"src/spellcheck/sonnet/gentrigrams.qbs",
"src/spellcheck/sonnet/parsetrigrams.qbs",
"src/yaml/yaml.qbs",
//"setup/package_build.qbs",
]
}