2014-08-04 19:20:57 +04:00
|
|
|
if( UNIX AND NOT APPLE )
|
|
|
|
|
2021-04-15 02:06:52 +03:00
|
|
|
SET(ICON_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor)
|
2014-08-04 19:20:57 +04:00
|
|
|
|
|
|
|
FOREACH(size 128x128 16x16 256x256 32x32 48x48 64x64 72x72)
|
2014-08-05 13:46:21 +04:00
|
|
|
file(GLOB files "${size}/*.png")
|
2014-08-29 22:01:39 +04:00
|
|
|
FOREACH( file ${files} )
|
2014-09-29 18:08:49 +04:00
|
|
|
# the GLOB returns a absolute path. Make it relative by replacing the current src dir by nothing
|
|
|
|
STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/${size}/" "" shortFile ${file})
|
2017-08-31 14:16:34 +03:00
|
|
|
STRING(REPLACE "oC" ${APPLICATION_SHORTNAME} brandedName ${shortFile})
|
2014-08-29 22:01:39 +04:00
|
|
|
install(FILES ${file} DESTINATION ${ICON_DIR}/${size}/apps RENAME ${brandedName})
|
|
|
|
ENDFOREACH(file)
|
2014-08-04 19:20:57 +04:00
|
|
|
ENDFOREACH(size)
|
|
|
|
|
|
|
|
endif()
|