forked from eghuro/qtkeychain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qt5keychain.pri
83 lines (72 loc) · 2.42 KB
/
qt5keychain.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
# Minimal qmake support.
# This file is provided as is without any warranty.
# It can break at anytime or be removed without notice.
QT5KEYCHAIN_PWD = $$PWD
CONFIG += depend_includepath
DEFINES += QTKEYCHAIN_NO_EXPORT
INCLUDEPATH += \
$$PWD/.. \
$$QT5KEYCHAIN_PWD
HEADERS += \
$$QT5KEYCHAIN_PWD/keychain_p.h \
$$QT5KEYCHAIN_PWD/keychain.h
SOURCES += \
$$QT5KEYCHAIN_PWD/keychain.cpp
unix:!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:
QT += dbus
kwallet_interface.files = $$PWD/org.kde.KWallet.xml
DBUS_INTERFACES += kwallet_interface
HEADERS += \
$$QT5KEYCHAIN_PWD/gnomekeyring_p.h \
$$QT5KEYCHAIN_PWD/plaintextstore_p.h \
$$QT5KEYCHAIN_PWD/libsecret_p.h
SOURCES += \
$$QT5KEYCHAIN_PWD/keychain_unix.cpp \
$$QT5KEYCHAIN_PWD/plaintextstore.cpp \
$$QT5KEYCHAIN_PWD/gnomekeyring.cpp \
$$QT5KEYCHAIN_PWD/libsecret.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 += $$QT5KEYCHAIN_PWD/plaintextstore_p.h
SOURCES += $$QT5KEYCHAIN_PWD/plaintextstore.cpp
}
HEADERS += $$QT5KEYCHAIN_PWD/libsecret_p.h
SOURCES += \
$$QT5KEYCHAIN_PWD/keychain_win.cpp \
$$QT5KEYCHAIN_PWD/libsecret.cpp
}
macx:!ios {
LIBS += "-framework Security" "-framework Foundation"
SOURCES += $$QT5KEYCHAIN_PWD/keychain_mac.cpp
}
ios {
LIBS += "-framework Security" "-framework Foundation"
OBJECTIVE_SOURCES += $$QT5KEYCHAIN_PWD/keychain_ios.mm
}