This repository has been archived by the owner on Jun 19, 2020. It is now read-only.
forked from frankosterfeld/qtkeychain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qtkeychain.qbs
139 lines (120 loc) · 2.94 KB
/
qtkeychain.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
import qbs
Product
{
name: "qtkeychain"
type: buildStatic ? "staticlibrary" : "dynamiclibrary"
targetName: "qtkeychain"
property bool buildTranslations: false
property bool buildStatic: false
property bool libsecretSupport: false
Depends { name: "cpp" }
Depends { name: "Qt.core" }
Depends { name: "Qt.dbus"; condition: qbs.targetOS.contains("linux") }
Depends { name: "Quarks"; required: false }
condition: !Quarks.present || Quarks.enabledQuarks.contains("qtkeychain")
cpp.defines: [ buildStatic ? "QKEYCHAIN_STATICLIB" : "QKEYCHAIN_SHAREDLIB" ]
cpp.includePaths:
[
"."
]
Group
{
name: "Source"
files:
[
"keychain.cpp",
"keychain.h",
"keychain_p.h",
"qkeychain_export.h"
]
}
Group
{
condition: buildTranslations
name: "Translations"
files: [ "translations/*.ts" ]
}
Export
{
Depends { name: "cpp" }
Depends { name: "Qt.core" }
Depends { name: "Qt.dbus"; condition: qbs.targetOS.contains("linux") }
cpp.includePaths:
[
"."
]
}
// linux support
Group
{
condition: qbs.targetOS.contains("linux")
name: "Linux Support"
files:
[
"keychain_unix.cpp",
"gnomekeyring.cpp",
"gnomekeyring_p.h",
"plaintextstore.cpp",
"plaintextstore_p.h",
"libsecret.cpp",
"libsecret_p.h"
]
}
Group
{
condition: qbs.targetOS.contains("linux")
name: "DBus interface generation"
files: "org.kde.KWallet.xml"
fileTags: ["qt.dbus.interface"]
}
// Libsecret support
Properties
{
condition: qbs.targetOS.contains("linux") && libsecretSupport
cpp.defines: outer.concat(["HAVE_LIBSECRET=1"])
}
// Windows configuration (defaults to use Windows Credential Store for Win7+)
Properties
{
condition: qbs.targetOS.contains("windows")
cpp.defines: outer.concat(["USE_CREDENTIAL_STORE=1"])
}
Group
{
condition: qbs.targetOS.contains("windows")
name: "Windows Support"
files:
[
"keychain_win.cpp",
"plaintextstore.cpp",
"plaintextstore_p.h"
]
}
// macOS / iOS configuration
Properties
{
condition: qbs.targetOS.contains("macos") || qbs.targetOS.contains("ios")
cpp.frameworks:
[
"Security",
"Foundation"
]
}
Group
{
condition: qbs.targetOS.contains("macos")
name: "macOS"
files: ["keychain_mac.cpp"]
}
Group
{
condition: qbs.targetOS.contains("ios")
name: "iOS"
files: ["keychain_ios.mm"]
}
Group
{
fileTagsFilter: "dynamiclibrary"
qbs.install: true
}
}