Merge pull request #11157 from h3xx/use-gnuinstalldirs
Use GNUInstallDirs for installation paths
This commit is contained in:
commit
69b178e95f
|
@ -132,15 +132,14 @@ include(CheckVendoringApproved)
|
||||||
include(DolphinCompileDefinitions)
|
include(DolphinCompileDefinitions)
|
||||||
include(DolphinDisableWarningsMSVC)
|
include(DolphinDisableWarningsMSVC)
|
||||||
include(DolphinLibraryTools)
|
include(DolphinLibraryTools)
|
||||||
|
include(GNUInstallDirs)
|
||||||
include(RemoveCompileFlag)
|
include(RemoveCompileFlag)
|
||||||
|
|
||||||
# Enable folders for IDE
|
# Enable folders for IDE
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
# Set up paths
|
# Set up paths
|
||||||
set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir")
|
set(datadir ${CMAKE_INSTALL_FULL_DATADIR}/dolphin-emu CACHE PATH "datadir")
|
||||||
set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir")
|
|
||||||
set(mandir ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "mandir")
|
|
||||||
add_definitions(-DDATA_DIR="${datadir}/")
|
add_definitions(-DDATA_DIR="${datadir}/")
|
||||||
|
|
||||||
if(CMAKE_SYSROOT)
|
if(CMAKE_SYSROOT)
|
||||||
|
@ -1020,9 +1019,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD")
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||||
# Install manpages
|
# Install manpages
|
||||||
install(FILES Data/dolphin-emu.6
|
install(FILES Data/dolphin-emu.6
|
||||||
DESTINATION ${mandir}/man6)
|
DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
|
||||||
install(FILES Data/dolphin-emu-nogui.6
|
install(FILES Data/dolphin-emu-nogui.6
|
||||||
DESTINATION ${mandir}/man6)
|
DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# packaging information
|
# packaging information
|
||||||
|
|
|
@ -36,5 +36,5 @@ if(USE_DISCORD_PRESENCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-nogui)
|
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-nogui)
|
||||||
install(TARGETS dolphin-nogui RUNTIME DESTINATION ${bindir})
|
install(TARGETS dolphin-nogui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
|
|
|
@ -626,7 +626,7 @@ if(APPLE)
|
||||||
/usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}/Dolphin.app" || true)
|
/usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}/Dolphin.app" || true)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
install(TARGETS dolphin-emu RUNTIME DESTINATION ${bindir})
|
install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND STEAM)
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND STEAM)
|
||||||
|
|
|
@ -25,4 +25,4 @@ if(MSVC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-tool)
|
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-tool)
|
||||||
install(TARGETS dolphin-tool RUNTIME DESTINATION ${bindir})
|
install(TARGETS dolphin-tool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
add_executable(dsptool DSPTool.cpp StubHost.cpp)
|
add_executable(dsptool DSPTool.cpp StubHost.cpp)
|
||||||
target_link_libraries(dsptool core)
|
target_link_libraries(dsptool core)
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
install(TARGETS dsptool RUNTIME DESTINATION ${bindir})
|
install(TARGETS dsptool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue