For testing/developement purposes I find it preferable to install linux in my personal file system rather than in the system locations. The 5.1.0 release unconditionally installs two files (xtrkcad.desktop and xtrkcad.png) in /usr/share which of course requires the install be done as root.
I have introduced a new cmake option to control this for my own use. I will make it available shortly. It would be convenient if it made it into the regular branches.
The attached patch Implements my suggestion. It adds a new option, XTRKCAD_OPENDESKTOP_COMPLIANCE, in the top level config file
which controls where xtrkcad.desktop and xtrkcad.png are installed. It defaults to ON which is current behaviour. I f OFF they are installed in install_dir/ share/xtrkcad along with everything else. Of course if they are put there, they will not be found automatically by desktop manager configurators, but for testing I run xtrkcad from the command line.