Merge pull request #11157 from h3xx/use-gnuinstalldirs

Use GNUInstallDirs for installation paths
This commit is contained in:
Admiral H. Curtiss
2023-02-01 19:35:46 +01:00
committed by GitHub
5 changed files with 8 additions and 9 deletions

View File

@ -132,15 +132,14 @@ include(CheckVendoringApproved)
include(DolphinCompileDefinitions)
include(DolphinDisableWarningsMSVC)
include(DolphinLibraryTools)
include(GNUInstallDirs)
include(RemoveCompileFlag)
# Enable folders for IDE
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Set up paths
set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir")
set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir")
set(mandir ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "mandir")
set(datadir ${CMAKE_INSTALL_FULL_DATADIR}/dolphin-emu CACHE PATH "datadir")
add_definitions(-DDATA_DIR="${datadir}/")
if(CMAKE_SYSROOT)
@ -1020,9 +1019,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD")
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
# Install manpages
install(FILES Data/dolphin-emu.6
DESTINATION ${mandir}/man6)
DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
install(FILES Data/dolphin-emu-nogui.6
DESTINATION ${mandir}/man6)
DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
endif()
# packaging information