forked from davidedmundson/xembed-sni-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
102 lines (79 loc) · 2.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
cmake_minimum_required(VERSION 2.8.12)
project(xembedsniproxy)
# Silence CMake 3.0 warnings
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
find_package(ECM 5.14.0 REQUIRED NO_MODULE)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(GenerateExportHeader)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
DBus
Gui
X11Extras
)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMInstallIcons)
include(ECMOptionalAddSubdirectory)
include(ECMQtDeclareLoggingCategory)
# required frameworks by Core
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
WindowSystem
)
# All the required XCB components
find_package(XCB
REQUIRED COMPONENTS
XCB
XFIXES
DAMAGE
COMPOSITE
RANDR
SHM
UTIL
IMAGE
)
add_definitions(-Wall -std=c++11)
add_definitions(-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY)
set(XEMBED_SNI_PROXY_SOURCES
main.cpp
fdoselectionmanager.cpp
snidbus.cpp
sniproxy.cpp
)
qt5_add_dbus_adaptor(XEMBED_SNI_PROXY_SOURCES org.kde.StatusNotifierItem.xml
sniproxy.h SNIProxy)
set(statusnotifierwatcher_xml org.kde.StatusNotifierWatcher.xml)
qt5_add_dbus_interface(XEMBED_SNI_PROXY_SOURCES ${statusnotifierwatcher_xml} statusnotifierwatcher_interface)
add_executable(xembedsniproxy ${XEMBED_SNI_PROXY_SOURCES})
set(XCB_LIBS
XCB::XCB
XCB::XFIXES
XCB::DAMAGE
XCB::COMPOSITE
XCB::RANDR
XCB::SHM
XCB::UTIL
XCB::IMAGE
)
set_package_properties(XCB PROPERTIES TYPE REQUIRED)
ecm_qt_declare_logging_category(xembedsniproxy HEADER debug.h
IDENTIFIER SNIPROXY
CATEGORY_NAME kde.xembedsniproxy
DEFAULT_SEVERITY Debug)
target_link_libraries(xembedsniproxy
Qt5::Core
Qt5::X11Extras
Qt5::DBus
KF5::WindowSystem
${XCB_LIBS}
)
install(TARGETS xembedsniproxy ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES xembedsniproxy.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})