-
Notifications
You must be signed in to change notification settings - Fork 160
/
qtkeychain.pri
97 lines (84 loc) · 2.76 KB
/
qtkeychain.pri
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
# Minimal qmake support.
# This file is provided as is without any warranty.
# It can break at anytime or be removed without notice.
lessThan(QT_MAJOR_VERSION, 5) {
error("qtkeychain requires Qt 5 or later")
}
QTKEYCHAIN_PWD = $$PWD/qtkeychain
CONFIG += depend_includepath
DEFINES += QTKEYCHAIN_NO_EXPORT
INCLUDEPATH += \
$$PWD/.. \
$$QTKEYCHAIN_PWD
HEADERS += \
$$QTKEYCHAIN_PWD/keychain_p.h \
$$QTKEYCHAIN_PWD/keychain.h
SOURCES += \
$$QTKEYCHAIN_PWD/keychain.cpp
unix:!android:!macx:!ios {
# Remove the following LIBSECRET_SUPPORT line
# to build without libsecret support.
DEFINES += LIBSECRET_SUPPORT
contains(DEFINES, LIBSECRET_SUPPORT) {
packagesExist(libsecret-1) {
!build_pass:message("Libsecret support: on")
CONFIG += link_pkgconfig
PKGCONFIG += libsecret-1
DEFINES += HAVE_LIBSECRET
} else {
!build_pass:warning("Libsecret not found.")
!build_pass:message("Libsecret support: off")
}
} else {
!build_pass:message("Libsecret support: off")
}
# Generate D-Bus interface:
DEFINES += KEYCHAIN_DBUS
QT += dbus
kwallet_interface.files = $$QTKEYCHAIN_PWD/org.kde.KWallet.xml
DBUS_INTERFACES += kwallet_interface
HEADERS += \
$$QTKEYCHAIN_PWD/gnomekeyring_p.h \
$$QTKEYCHAIN_PWD/plaintextstore_p.h \
$$QTKEYCHAIN_PWD/libsecret_p.h
SOURCES += \
$$QTKEYCHAIN_PWD/keychain_unix.cpp \
$$QTKEYCHAIN_PWD/plaintextstore.cpp \
$$QTKEYCHAIN_PWD/gnomekeyring.cpp \
$$QTKEYCHAIN_PWD/libsecret.cpp
}
android {
lessThan(QT_MAJOR_VERSION, 6) {
QT += androidextras
}
HEADERS += \
$$QTKEYCHAIN_PWD/androidkeystore_p.h \
$$QTKEYCHAIN_PWD/plaintextstore_p.h
SOURCES += \
$$QTKEYCHAIN_PWD/androidkeystore.cpp \
$$QTKEYCHAIN_PWD/keychain_android.cpp \
$$QTKEYCHAIN_PWD/plaintextstore.cpp
}
win32 {
# Remove the following USE_CREDENTIAL_STORE line
# to use the CryptProtectData Windows API function
# instead of the Windows Credential Store.
DEFINES += USE_CREDENTIAL_STORE
contains(DEFINES, USE_CREDENTIAL_STORE) {
!build_pass:message("Windows Credential Store support: on")
LIBS += -ladvapi32
} else {
!build_pass:message("Windows Credential Store support: off")
LIBS += -lcrypt32
HEADERS += $$QTKEYCHAIN_PWD/plaintextstore_p.h
SOURCES += $$QTKEYCHAIN_PWD/plaintextstore.cpp
}
HEADERS += $$QTKEYCHAIN_PWD/libsecret_p.h
SOURCES += \
$$QTKEYCHAIN_PWD/keychain_win.cpp \
$$QTKEYCHAIN_PWD/libsecret.cpp
}
macx|ios {
LIBS += -framework Security -framework Foundation
OBJECTIVE_SOURCES += $$QTKEYCHAIN_PWD/keychain_apple.mm
}