mirror of
https://github.com/QRouland/UTPass.git
synced 2024-12-22 09:52:39 +00:00
Fix cmake third linking
This commit is contained in:
parent
86643fa46f
commit
6a5c352aed
@ -13,26 +13,28 @@ add_library(${PLUGIN} MODULE ${SRC})
|
||||
set_target_properties(${PLUGIN} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PLUGIN})
|
||||
qt5_use_modules(${PLUGIN} Qml Quick DBus)
|
||||
|
||||
|
||||
set(EXTERNAL_LIBS "${CMAKE_SOURCE_DIR}/local")
|
||||
set(THIRD_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
INCLUDE_DIRECTORIES(${EXTERNAL_LIBS}/include)
|
||||
add_dependencies(${PLUGIN} LibGpgme)
|
||||
|
||||
add_library(target-LibGpgError STATIC IMPORTED)
|
||||
set_property(TARGET target-LibGpgError PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpg-error.a")
|
||||
add_library(GpgError STATIC IMPORTED)
|
||||
set_property(TARGET GpgError PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpg-error.a")
|
||||
|
||||
add_library(target-LibGpgAssuan STATIC IMPORTED)
|
||||
set_property(TARGET target-LibGpgAssuan PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libassuan.a")
|
||||
add_library(GpgAssuan STATIC IMPORTED)
|
||||
set_property(TARGET GpgAssuan PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libassuan.a")
|
||||
|
||||
add_library(target-LibGpgppme STATIC IMPORTED)
|
||||
set_property(TARGET target-LibGpgppme PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpgmepp.a")
|
||||
add_library(Gpgme STATIC IMPORTED)
|
||||
set_property(TARGET Gpgme PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpgme.a")
|
||||
|
||||
add_library(target-LibQGpgme STATIC IMPORTED)
|
||||
set_property(TARGET target-LibQGpgme PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libqgpgme.a")
|
||||
add_library(Gpgmepp STATIC IMPORTED)
|
||||
set_property(TARGET Gpgmepp PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libgpgmepp.a")
|
||||
|
||||
target_link_libraries(${PLUGIN} target-LibGpgAssuan target-LibGpgError target-LibGpgppme target-LibQGpgme)
|
||||
add_library(QGpgme STATIC IMPORTED)
|
||||
set_property(TARGET QGpgme PROPERTY IMPORTED_LOCATION "${EXTERNAL_LIBS}/lib/libqgpgme.a")
|
||||
|
||||
target_link_libraries(${PLUGIN} QGpgme Gpgmepp Gpgme GpgAssuan GpgError)
|
||||
|
||||
execute_process(
|
||||
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
|
||||
|
@ -2,17 +2,17 @@
|
||||
#include <QFile>
|
||||
#include "pass.h"
|
||||
#include "gpgme++/global.h"
|
||||
#include "gpgme++/engineinfo.h"
|
||||
#include "qgpgme/protocol.h"
|
||||
#include "qgpgme/encryptjob.h"
|
||||
#include "qgpgme/decryptjob.h"
|
||||
#include "qgpgme/keylistjob.h"
|
||||
|
||||
|
||||
|
||||
Pass::Pass() {
|
||||
qDebug() << "Initializing GpgMe";
|
||||
/*auto err = GpgME::initializeLibrary(GpgME::OpenPGP);
|
||||
if(err) {
|
||||
if(GpgME::initializeLibrary(GpgME::OpenPGP))
|
||||
qFatal("Fatal error when initializing GpgMe");
|
||||
}*/
|
||||
qDebug() << "GpgME Engine Version :" << GpgME::engineInfo(GpgME::GpgEngine).version();
|
||||
}
|
||||
|
||||
void Pass::speak() {
|
||||
@ -46,9 +46,15 @@ QString Pass::decrypt_file(const QString path) {
|
||||
QByteArray Pass::encrypt(const QString str) {
|
||||
/*auto listjob = QGpgME::openpgp()->keyListJob(false, false, false);
|
||||
std::vector<GpgME::Key> keys;
|
||||
auto keylistresult = listjob->exec(QStringList() << QStringLiteral("alfa@example.net"),
|
||||
false, keys);
|
||||
auto job = QGpgME::openpgp()->encryptJob(/*ASCII Armor *//*true, /* Textmode *//* true);
|
||||
auto keylistresult = listjob->exec(QStringList() << QStringLiteral("alfa@example.net"), false, keys);
|
||||
|
||||
|
||||
|
||||
auto job = QGpgME::openpgp()
|
||||
->encryptJob(
|
||||
true, //ASCII Armor
|
||||
true //Textmode
|
||||
);
|
||||
QByteArray cipherText;
|
||||
auto result = job->exec(keys, QStringLiteral("Hello World").toUtf8(), GpgME::Context::AlwaysTrust, cipherText);
|
||||
return cipherText;*/
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: utpass.qrouland\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-03-16 15:17+0000\n"
|
||||
"POT-Creation-Date: 2019-03-16 17:03+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
Loading…
Reference in New Issue
Block a user