dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

62 lines2192 bytes
1# Standalone build of plasma-workspace's xembed-sni-proxy. Replaces the upstream
2# CMakeLists.txt in that directory so it builds without the rest of
3# plasma-workspace (or extra-cmake-modules, which upstream uses to find XCB and
4# to generate debug.h).
5cmake_minimum_required(VERSION 3.16)
6project(xembedsniproxy LANGUAGES CXX)
7
8set(WORKSPACE_VERSION "0" CACHE STRING "plasma-workspace version being built")
9
10set(CMAKE_CXX_STANDARD 20)
11set(CMAKE_CXX_STANDARD_REQUIRED ON)
12set(CMAKE_AUTOMOC ON)
13set(CMAKE_INCLUDE_CURRENT_DIR ON)
14
15find_package(Qt6 REQUIRED COMPONENTS Core Gui DBus)
16find_package(KF6CoreAddons REQUIRED)
17find_package(KF6Crash REQUIRED)
18find_package(KF6DBusAddons REQUIRED)
19find_package(KF6WindowSystem REQUIRED)
20find_package(X11 REQUIRED)
21find_package(PkgConfig REQUIRED)
22pkg_check_modules(XCB REQUIRED IMPORTED_TARGET
23 xcb xcb-xfixes xcb-damage xcb-composite xcb-randr xcb-shape xcb-shm xcb-util xcb-image
24 xcb-icccm)
25
26# Stand-ins for the headers the full plasma-workspace build generates.
27file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h
28 "#define WORKSPACE_VERSION_STRING \"${WORKSPACE_VERSION}\"\n")
29file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/debug.h
30 "#pragma once\n#include <QLoggingCategory>\nQ_DECLARE_LOGGING_CATEGORY(SNIPROXY)\n")
31file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/debug.cpp
32 "#include \"debug.h\"\nQ_LOGGING_CATEGORY(SNIPROXY, \"kde.xembedsniproxy\", QtInfoMsg)\n")
33
34set(XEMBED_SNI_PROXY_SOURCES
35 main.cpp
36 fdoselectionmanager.cpp fdoselectionmanager.h
37 snidbus.cpp snidbus.h
38 sniproxy.cpp
39 xtestsender.cpp xtestsender.h
40 ${CMAKE_CURRENT_BINARY_DIR}/debug.cpp
41)
42
43qt_add_dbus_adaptor(XEMBED_SNI_PROXY_SOURCES org.kde.StatusNotifierItem.xml
44 sniproxy.h SNIProxy)
45qt_add_dbus_interface(XEMBED_SNI_PROXY_SOURCES org.kde.StatusNotifierWatcher.xml
46 statusnotifierwatcher_interface)
47
48add_executable(xembedsniproxy ${XEMBED_SNI_PROXY_SOURCES})
49
50target_link_libraries(xembedsniproxy
51 Qt6::Core
52 Qt6::Gui
53 Qt6::DBus
54 KF6::DBusAddons
55 KF6::WindowSystem
56 KF6::CoreAddons
57 KF6::Crash
58 PkgConfig::XCB
59 X11::Xtst
60)
61
62install(TARGETS xembedsniproxy RUNTIME DESTINATION bin)