chore: refine cmake files

This commit is contained in:
Kevin Yue 2022-05-21 20:55:05 +08:00
parent b99c5a8391
commit dffbc64ef5
5 changed files with 5 additions and 5 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@ build
artifacts artifacts
.cmake .cmake
.idea
# Auto generated DBus files # Auto generated DBus files
*_adaptor.cpp *_adaptor.cpp

View File

@ -92,7 +92,7 @@ target_link_libraries(gpclient
QtSignals QtSignals
) )
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0 AND CMAKE_BUILD_TYPE STREQUAL Release)
target_compile_options(gpclient PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") target_compile_options(gpclient PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
endif() endif()

View File

@ -35,7 +35,7 @@ GPClient::GPClient(QWidget *parent, IVpn *vpn)
connect(ov, SIGNAL(error(QString)), this, SLOT(onVPNError(QString))); connect(ov, SIGNAL(error(QString)), this, SLOT(onVPNError(QString)));
connect(ov, SIGNAL(logAvailable(QString)), this, SLOT(onVPNLogAvailable(QString))); connect(ov, SIGNAL(logAvailable(QString)), this, SLOT(onVPNLogAvailable(QString)));
// Initiallize the context menu of system tray. // Initialize the context menu of system tray.
initSystemTrayIcon(); initSystemTrayIcon();
initVpnStatus(); initVpnStatus();
} }

View File

@ -1,6 +1,5 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QString> #include <QtCore/QString>
#include <QtCore/QDir>
#include <QtCore/QStandardPaths> #include <QtCore/QStandardPaths>
#include <plog/Log.h> #include <plog/Log.h>
#include <plog/Init.h> #include <plog/Init.h>

View File

@ -136,7 +136,7 @@ void GPService::connect(QString server, QString username, QString passwd)
<< "--cookie-on-stdin" << "--cookie-on-stdin"
<< server; << server;
log("Start process with arugments: " + args.join(" ")); log("Start process with arugments: " + args.join(", "));
openconnect->start(bin, args); openconnect->start(bin, args);
openconnect->write((passwd + "\n").toUtf8()); openconnect->write((passwd + "\n").toUtf8());