Hey, Here's a quick patch for ksystemstats to use the same cmake variable that is used by libksysguard which owns the xml file in question. This fixes the build when kde is installed in for example /opt/kde5.
--- ./src/CMakeLists.txt.orig 2021-09-16 02:40:08.000000000 -0600 +++ ./src/CMakeLists.txt 2021-09-19 21:44:25.062696924 -0600 @@ -7,7 +7,7 @@ set(SOURCES daemon.cpp ) -find_file(SYSTEMSTATS_DBUS_INTERFACE NAMES dbus-1/interfaces/org.kde.ksystemstats.xml HINTS ${KDE_INSTALL_FULL_DATADIR}) +find_file(SYSTEMSTATS_DBUS_INTERFACE NAMES org.kde.ksystemstats.xml HINTS ${KDE_INSTALL_DBUSINTERFACEDIR}) qt_add_dbus_adaptor(SOURCES ${SYSTEMSTATS_DBUS_INTERFACE} daemon.h Daemon) add_library(ksystemstats_core STATIC ${SOURCES})