Skip to content

Commit

Permalink
Install hicolor icons
Browse files Browse the repository at this point in the history
  • Loading branch information
tehnick committed Feb 2, 2021
1 parent 889432c commit ff7b8b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -477,15 +477,28 @@ copy("${PROJECT_SOURCE_DIR}/client_icons.txt" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}

#INSTALL SECTION
if(LINUX)
if(NOT VERBOSED_NAME)
set(VERBOSED_NAME ${PROJECT_NAME})
endif()
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share")
set(ICONS_INSTALL_PREFIX "${DATA_INSTALL_DIR}/icons/hicolor")
set(RESOLUTIONS 16 32 48 64 128)
if(IS_PSIPLUS)
set(SHARE_SUFF "share/psi-plus")
set(PSI_LOGO_PREFIX ${PROJECT_SOURCE_DIR}/iconsets/system/default/psiplus)
install(FILES ${PROJECT_SOURCE_DIR}/psi.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications RENAME psi-plus.desktop)
install(FILES ${PROJECT_SOURCE_DIR}/iconsets/system/default/psiplus/logo_128.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME psi-plus.png)
else()
set(SHARE_SUFF "share/psi")
set(PSI_LOGO_PREFIX ${PROJECT_SOURCE_DIR}/iconsets/system/default)
install(FILES ${PROJECT_SOURCE_DIR}/psi.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
install(FILES ${PROJECT_SOURCE_DIR}/iconsets/system/default/logo_128.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME psi.png)
endif()
foreach(resolution ${RESOLUTIONS})
unset(LOGO_NAME)
set(LOGO_NAME "${PSI_LOGO_PREFIX}/logo_${resolution}.png")
install(FILES ${LOGO_NAME} DESTINATION "${ICONS_INSTALL_PREFIX}/${resolution}x${resolution}/apps" RENAME ${VERBOSED_NAME}.png)
endforeach()
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(FILES ${PROJECT_SOURCE_DIR}/client_icons.txt DESTINATION ${CMAKE_INSTALL_PREFIX}/${SHARE_SUFF})
install(DIRECTORY ${OTHER_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/${SHARE_SUFF})
Expand Down

0 comments on commit ff7b8b0

Please sign in to comment.