85 lines
2.3 KiB
CMake
85 lines
2.3 KiB
CMake
cmake_minimum_required(VERSION 3.16)
|
|
|
|
project(xembed-traymanager-proxy)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON) # ensure adapter class can include related header
|
|
|
|
find_package(Qt6 6.8 CONFIG REQUIRED COMPONENTS DBus)
|
|
find_package(ECM REQUIRED NO_MODULE)
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|
include(ECMQtDeclareLoggingCategory)
|
|
include(KDEInstallDirs)
|
|
include(ECMConfiguredInstall)
|
|
|
|
find_package(KF6 6.6 REQUIRED COMPONENTS
|
|
WindowSystem)
|
|
|
|
find_package(XCB
|
|
REQUIRED COMPONENTS
|
|
XCB
|
|
XFIXES
|
|
DAMAGE
|
|
COMPOSITE
|
|
RANDR
|
|
SHM
|
|
UTIL
|
|
IMAGE
|
|
)
|
|
|
|
set(XCB_LIBS
|
|
XCB::XCB
|
|
XCB::XFIXES
|
|
XCB::DAMAGE
|
|
XCB::COMPOSITE
|
|
XCB::RANDR
|
|
XCB::SHM
|
|
XCB::UTIL
|
|
XCB::IMAGE
|
|
)
|
|
|
|
set(XEMBED_SNI_PROXY_SOURCES
|
|
main.cpp
|
|
fdoselectionmanager.cpp fdoselectionmanager.h
|
|
traymanager1.cpp traymanager1.h
|
|
traymanagerproxy.cpp traymanagerproxy.h
|
|
xtestsender.cpp xtestsender.h
|
|
)
|
|
|
|
set_source_files_properties(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/org.deepin.dde.TrayManager1.xml
|
|
PROPERTIES INCLUDE traylist.h
|
|
CLASSNAME TrayManager
|
|
)
|
|
|
|
qt_add_dbus_adaptor(XEMBED_SNI_PROXY_SOURCES org.deepin.dde.TrayManager1.xml traymanager1.h TrayManager1)
|
|
|
|
ecm_qt_declare_logging_category(XEMBED_SNI_PROXY_SOURCES HEADER debug.h
|
|
IDENTIFIER SNIPROXY
|
|
CATEGORY_NAME dde.xembedsniproxy
|
|
DEFAULT_SEVERITY Info
|
|
DESCRIPTION "xembed sni proxy"
|
|
EXPORT PLASMAWORKSPACE
|
|
)
|
|
|
|
add_executable(xembed-traymanager-proxy ${XEMBED_SNI_PROXY_SOURCES})
|
|
set_property(TARGET xembed-traymanager-proxy PROPERTY AUTOMOC ON)
|
|
|
|
|
|
set_package_properties(XCB PROPERTIES TYPE REQUIRED)
|
|
|
|
|
|
target_link_libraries(xembed-traymanager-proxy
|
|
Qt::Core
|
|
Qt::DBus
|
|
KF6::WindowSystem
|
|
${XCB_LIBS}
|
|
X11::Xtst
|
|
)
|
|
|
|
install(TARGETS xembed-traymanager-proxy ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
|
install(FILES xembedsniproxy.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
|
|
|
|
ecm_install_configured_files(INPUT plasma-xembedsniproxy.service.in @ONLY DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
|