Reintroduce minimal qmake support

This is a small pri file that tests project can include to get
keychain support quickly.
This commit is contained in:
Filipe Azevedo 2016-11-16 20:33:27 +01:00
parent 496979af09
commit 9b9cccc843
2 changed files with 54 additions and 0 deletions

View File

@ -9,7 +9,11 @@
#ifndef KEYCHAIN_H
#define KEYCHAIN_H
#if !defined(QTKEYCHAIN_NO_EXPORT)
#include "qkeychain_export.h"
#else
#define QKEYCHAIN_EXPORT
#endif
#include <QtCore/QObject>
#include <QtCore/QString>

50
qt5keychain.pri Normal file
View File

@ -0,0 +1,50 @@
# 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
#CONFIG += plaintextstore
INCLUDEPATH += \
$$PWD/.. \
$$QT5KEYCHAIN_PWD
HEADERS += \
$$QT5KEYCHAIN_PWD/keychain_p.h \
$$QT5KEYCHAIN_PWD/keychain.h
SOURCES *= \
$$QT5KEYCHAIN_PWD/keychain.cpp
plaintextstore {
HEADERS += $$QT5KEYCHAIN_PWD/plaintextstore_p.h
SOURCES += $$QT5KEYCHAIN_PWD/plaintextstore.cpp
} else {
unix:!macx {
QT += dbus
HEADERS += $$QT5KEYCHAIN_PWD/gnomekeyring_p.h
SOURCES += \
$$QT5KEYCHAIN_PWD/gnomekeyring.cpp \
$$QT5KEYCHAIN_PWD/keychain_unix.cpp
}
win {
HEADERS += $$QT5KEYCHAIN_PWD/libsecret_p.h
SOURCES += \
$$QT5KEYCHAIN_PWD/keychain_win.cpp \
$$QT5KEYCHAIN_PWD/libsecret.cpp
#DBUS_INTERFACES += $$PWD/Keychain/org.kde.KWallet.xml
}
mac {
LIBS += "-framework Security" "-framework Foundation"
SOURCES += $$QT5KEYCHAIN_PWD/keychain_mac.cpp
}
}