offa / plug

Software for Fender Mustang Amps.
GNU General Public License v3.0
54 stars 20 forks source link

Fix CMake default install paths #15

Closed fpesari closed 2 years ago

fpesari commented 2 years ago

Hello,

I made the CMake default install paths a bit more conforming to the Freedesktop standards (source for udev, desktop files).

fpesari commented 2 years ago

Also, this line:

https://github.com/offa/plug/blob/359ebb621674df0d48207ce3fcc90f7b9d7c1cfa/cmake/Install.cmake#L19

Could be changed to install the plug directory to $LIBDIR/cmake.

offa commented 2 years ago

This might be a good change to switch to GNUInstallDirs. What do you think?

offa commented 2 years ago

Could be changed to install the plug directory to $LIBDIR/cmake.

Indeed, so it would become <libdir>/cmake/plug/.

fpesari commented 2 years ago

This might be a good change to switch to GNUInstallDirs. What do you think?

I actually just packaged this on openSUSE for the multimedia:proaudio repo (here). I could do it without modifying the source, just by passing the variables to cmake via -D, without any problems*.

Switching to GNUInstallDirs is the best way to handle directories I know of but I would not consider it high-priority since the package can be installed fairly easily right now (except for these three paths). If you can do it in a short time, sure.

* = Actually, I encountered a bug during linking (which is not related to the lack of GNUInstallDirs) which made the build fail when I used the %cmake RPM macro rather than the cmake command directly. Basically, libusb did not get linked and I got a lot of undefined references. I did not report it because using cmake without the RPM macro works.

offa commented 2 years ago

Switching to GNUInstallDirs is the best way to handle directories I know of but I would not consider it high-priority since the package can be installed fairly easily right now (except for these three paths).

Have it on my todo list, but low prio too :-)

I'm going to merge this PR then! :+1: Thanks for your contribution!