1982: Fixed installation on other than Ubuntu GNU/Linux distributions r=heinrich5991 a=ElXreno

Fixed installation on other than Ubuntu GNU/Linux distributions.

Fedora and other GNU/Linux distributions use different $libdir prefixes. Now it can be installed on any GNU/Linux distributions.

Co-authored-by: ElXreno <elxreno@gmail.com>
This commit is contained in:
bors[bot] 2019-12-06 12:21:30 +00:00 committed by GitHub
commit 6fa7837892
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1413,13 +1413,14 @@ if(TARGET_OS STREQUAL "windows")
endif()
if(NOT DEV)
install(DIRECTORY data DESTINATION share/ddnet COMPONENT data)
install(TARGETS ${TARGET_CLIENT} DESTINATION bin COMPONENT client)
install(TARGETS ${TARGET_SERVER} DESTINATION bin COMPONENT server)
install(TARGETS ${TARGETS_TOOLS} DESTINATION lib/ddnet COMPONENT tools)
install(FILES other/ddnet.desktop DESTINATION share/applications COMPONENT client)
include(GNUInstallDirs)
install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ddnet COMPONENT data)
install(TARGETS ${TARGET_CLIENT} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
install(TARGETS ${TARGET_SERVER} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
install(TARGETS ${TARGETS_TOOLS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT tools)
install(FILES other/ddnet.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications COMPONENT client)
foreach(SIZE 16 32 48 128 256 512)
install(FILES other/icons/DDNet_${SIZE}x${SIZE}x32.png DESTINATION share/icons/hicolor/${SIZE}x${SIZE}/apps RENAME ddnet.png COMPONENT client)
install(FILES other/icons/DDNet_${SIZE}x${SIZE}x32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME ddnet.png COMPONENT client)
endforeach()
endif()