mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
migrate to cmake
This commit is contained in:
29
GPService/CMakeLists.txt
Normal file
29
GPService/CMakeLists.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
project(gpservice)
|
||||
|
||||
set(gpservice_GENERATED_SOURCES)
|
||||
|
||||
# generate the dbus xml definition
|
||||
qt5_generate_dbus_interface(gpservice.h ${CMAKE_BINARY_DIR}/com.yuezk.qt.GPService.xml)
|
||||
|
||||
# generate dbus adaptor
|
||||
qt5_add_dbus_adaptor(
|
||||
gpservice_GENERATED_SOURCES
|
||||
${CMAKE_BINARY_DIR}/com.yuezk.qt.GPService.xml
|
||||
gpservice.h
|
||||
GPService
|
||||
)
|
||||
|
||||
add_executable(gpservice
|
||||
gpservice.cpp
|
||||
main.cpp
|
||||
sigwatch.cpp
|
||||
${gpservice_GENERATED_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(gpservice PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
target_link_libraries(gpservice
|
||||
SingleApplication
|
||||
Qt5::Core
|
||||
Qt5::DBus
|
||||
)
|
@@ -1,5 +1,5 @@
|
||||
#include "gpservice.h"
|
||||
#include "gpservice_adaptor.h"
|
||||
#include "gpserviceadaptor.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QtDBus>
|
||||
|
@@ -21,6 +21,8 @@ public:
|
||||
explicit GPService(QObject *parent = nullptr);
|
||||
~GPService();
|
||||
|
||||
void quit();
|
||||
|
||||
enum VpnStatus {
|
||||
VpnNotConnected,
|
||||
VpnConnecting,
|
||||
@@ -38,7 +40,6 @@ public slots:
|
||||
void connect(QString server, QString username, QString passwd, QString extraArgs);
|
||||
void disconnect();
|
||||
int status();
|
||||
void quit();
|
||||
|
||||
private slots:
|
||||
void onProcessStarted();
|
||||
|
Reference in New Issue
Block a user