This guide will show you how to install xrdesktop into /usr/local. Make sure pkg-config searches this path.
I didn't test if this actually works, especially on your distro. Contributions to this guide are welcome, you can join our chats to seek support.
KWin by default does not load effect plugins from /usr/local. There are two ways to make the plugin work.
a) install the kwin plugin in the /usr prefix instead of /usr/local
cd kwin-effect-xrdesktopcmake -DCMAKE_INSTALL_PREFIX=/usr .makesudo make installcd ..
b) install the plugin in /usr/local and always set the environment variable QT_PLUGIN_PATH before starting kwin_x11.
cd kwin-effect-xrdesktopcmake .makesudo make installcd ..
Observe where make install installs the plugin and restart kwin with the QT_PLUGIN_PATH set to the plugins/ directory like so (example from Ubuntu 19.04) QT_PLUGIN_PATH=/usr/local/lib/x86_64-linux-gnu/plugins/ kwin_x11 --replace
Install plasma applet
cd kdeplasma-applets-xrdesktopcmake .makesudo make installcd ..