Browse Source

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.
Rasmus Thomsen 7 years ago
parent
commit
196610375d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      CMakeModules/LinuxConfiguration.cmake

+ 2 - 2
CMakeModules/LinuxConfiguration.cmake

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