mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
update cmake file
This commit is contained in:
parent
e012b53663
commit
3d9e416d77
@ -3,7 +3,6 @@ include("${CMAKE_SOURCE_DIR}/cmake/Add3rdParty.cmake")
|
||||
project(GPClient)
|
||||
|
||||
set(gpclient_GENERATED_SOURCES)
|
||||
# set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication")
|
||||
|
||||
qt5_add_dbus_interface(gpclient_GENERATED_SOURCES ${CMAKE_BINARY_DIR}/com.yuezk.qt.GPService.xml gpserviceinterface)
|
||||
|
||||
@ -35,7 +34,6 @@ add_3rdparty(
|
||||
SingleApplication
|
||||
GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git
|
||||
GIT_TAG v3.3.0
|
||||
EXCLUDE_FROM_ALL
|
||||
CMAKE_ARGS -DQAPPLICATION_CLASS=QApplication
|
||||
)
|
||||
|
||||
@ -43,20 +41,17 @@ add_3rdparty(
|
||||
plog
|
||||
GIT_REPOSITORY https://github.com/SergiusTheBest/plog.git
|
||||
GIT_TAG 1.1.5
|
||||
EXCLUDE_FROM_ALL
|
||||
CMAKE_ARGS -DPLOG_BUILD_SAMPLES=OFF
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(SingleApplication-${PROJECT_NAME} SOURCE_DIR)
|
||||
ExternalProject_Get_Property(SingleApplication-${PROJECT_NAME} SOURCE_DIR BINARY_DIR)
|
||||
set(SingleApplication_INCLUDE_DIR ${SOURCE_DIR})
|
||||
|
||||
ExternalProject_Get_Property(SingleApplication-${PROJECT_NAME} BINARY_DIR)
|
||||
set(SingleApplication_LIBRARY ${BINARY_DIR}/libSingleApplication.a)
|
||||
|
||||
ExternalProject_Get_Property(plog-${PROJECT_NAME} SOURCE_DIR)
|
||||
set(plog_INCLUDE_DIR "${SOURCE_DIR}/include")
|
||||
|
||||
add_dependencies(gpservice SingleApplication-${PROJECT_NAME} plog-${PROJECT_NAME})
|
||||
add_dependencies(gpclient SingleApplication-${PROJECT_NAME} plog-${PROJECT_NAME})
|
||||
|
||||
target_include_directories(gpclient PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@ -75,7 +70,7 @@ target_link_libraries(gpclient
|
||||
Qt5::DBus
|
||||
)
|
||||
|
||||
target_compile_definitions(gpclient PUBLIC QAPPLICATION_CLASS=QApplication)
|
||||
# target_compile_definitions(gpclient PUBLIC QAPPLICATION_CLASS=QApplication)
|
||||
|
||||
install(TARGETS gpclient DESTINATION "/usr/bin")
|
||||
install(FILES com.yuezk.qt.gpclient.desktop DESTINATION "/usr/share/applications")
|
||||
|
@ -26,12 +26,10 @@ add_3rdparty(
|
||||
SingleApplication
|
||||
GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git
|
||||
GIT_TAG v3.3.0
|
||||
EXCLUDE_FROM_ALL
|
||||
CMAKE_ARGS -DQAPPLICATION_CLASS=QCoreApplication
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(SingleApplication-${PROJECT_NAME} SOURCE_DIR)
|
||||
ExternalProject_Get_Property(SingleApplication-${PROJECT_NAME} BINARY_DIR)
|
||||
ExternalProject_Get_Property(SingleApplication-${PROJECT_NAME} SOURCE_DIR BINARY_DIR)
|
||||
|
||||
set(SingleApplication_INCLUDE_DIR ${SOURCE_DIR})
|
||||
set(SingleApplication_LIBRARY ${BINARY_DIR}/libSingleApplication.a)
|
||||
@ -51,7 +49,7 @@ target_link_libraries(gpservice
|
||||
Qt5::DBus
|
||||
)
|
||||
|
||||
target_compile_definitions(gpservice PUBLIC QAPPLICATION_CLASS=QCoreApplication)
|
||||
# target_compile_definitions(gpservice PUBLIC QAPPLICATION_CLASS=QCoreApplication)
|
||||
|
||||
install(TARGETS gpservice DESTINATION "/usr/bin")
|
||||
install(FILES "dbus/com.yuezk.qt.GPService.conf" DESTINATION "/usr/share/dbus-1/system.d" )
|
||||
|
@ -2,7 +2,7 @@ include(ExternalProject)
|
||||
|
||||
function(add_3rdparty NAME)
|
||||
set(oneValueArgs GIT_REPOSITORY GIT_TAG)
|
||||
cmake_parse_arguments(add_3rdparty_args "${oneValueArgs}" "" ${ARGN})
|
||||
cmake_parse_arguments(add_3rdparty_args "" "${oneValueArgs}" "" ${ARGN})
|
||||
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty/${NAME}/CMakeLists.txt")
|
||||
message(STATUS "Found third party locally for ${NAME}")
|
||||
|
Loading…
Reference in New Issue
Block a user