LinuxConfiguration: Use GNUInstallDirs to fix installation paths

in some edge cases we want to install binaries into paths
other than ${PREFIX}/bin and shared files in paths other
than ${PREFIX}/usr/share. This commit allows doing that
by including GNUInstallDirs for Linux builds, which allows
passing `CMAKE_INSTALL_DATAROOTDIR` and `CMAKE_INSTALL_BINDIR`
to cmake to customise these paths. If these aren't supplied
nothing changes, their defaults values equal to `bin` and `shared`,
as before.
This commit is contained in:
Rasmus Thomsen 2018-04-14 19:17:26 +02:00 committed by Lionel CHAZALLON
parent e6ce493412
commit 196610375d

View File

@ -18,8 +18,8 @@ else()
Message(STATUS "Enabling D-Bus power management") Message(STATUS "Enabling D-Bus power management")
endif() endif()
set(INSTALL_BIN_DIR bin) set(INSTALL_BIN_DIR ${CMAKE_INSTALL_BINDIR})
set(INSTALL_RESOURCE_DIR share/plexmediaplayer) set(INSTALL_RESOURCE_DIR ${CMAKE_INSTALL_DATADIR}/plexmediaplayer)
if(NOT OPENELEC) if(NOT OPENELEC)
include(InstallLinuxDesktopFile) include(InstallLinuxDesktopFile)