1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-12-18 10:37:53 +01:00

Simplify icon installation (#114)

Uses a foreach loop to iterate over the possible sizes. Should help in the future if more are added.
This commit is contained in:
Nicola Smaniotto 2021-12-26 11:43:47 +01:00 committed by GitHub
parent a6e2a433c4
commit 5ffbab8208
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

@ -222,15 +222,9 @@ if(UNIX AND NOT APPLE)
include(GNUInstallDirs)
install(TARGETS "${PROJECT_NAME}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(FILES "/Platform/Linux/${PROJECT_NAME}.desktop" DESTINATION "share/applications")
install(FILES "/Platform/Linux/${PROJECT_NAME}.metainfo.xml" DESTINATION "share/metainfo")
install(FILES "${PROJECT_NAME}/Icon_16x16.png" DESTINATION
"share/icons/hicolor/16x16/apps" RENAME "${PROJECT_NAME}.png")
install(FILES "${PROJECT_NAME}/Icon_32x32.png" DESTINATION
"share/icons/hicolor/32x32/apps" RENAME "${PROJECT_NAME}.png")
install(FILES "${PROJECT_NAME}/Icon_48x48.png" DESTINATION
"share/icons/hicolor/48x48/apps" RENAME "${PROJECT_NAME}.png")
install(FILES "${PROJECT_NAME}/Icon_128x128.png" DESTINATION
"share/icons/hicolor/128x128/apps" RENAME "${PROJECT_NAME}.png")
install(FILES "${PROJECT_NAME}/Icon_192x192.png" DESTINATION
"share/icons/hicolor/192x192/apps" RENAME "${PROJECT_NAME}.png")
install(FILES "/Platform/Linux/${PROJECT_NAME}.metainfo.xml" DESTINATION "share/metainfo")
foreach(S 16 32 48 128 192)
install(FILES "${PROJECT_NAME}/Icon_${S}x${S}.png" DESTINATION
"share/icons/hicolor/${S}x${S}/apps" RENAME "${PROJECT_NAME}.png")
endforeach(S)
endif()