CMakeLists.txt 607 B

123456789101112131415
  1. if( UNIX AND NOT APPLE )
  2. SET(ICON_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor)
  3. FOREACH(size 128x128 16x16 256x256 32x32 48x48 64x64 72x72)
  4. file(GLOB files "${size}/*.png")
  5. FOREACH( file ${files} )
  6. # the GLOB returns a absolute path. Make it relative by replacing the current src dir by nothing
  7. STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/${size}/" "" shortFile ${file})
  8. STRING(REPLACE "oC" ${APPLICATION_SHORTNAME} brandedName ${shortFile})
  9. install(FILES ${file} DESTINATION ${ICON_DIR}/${size}/apps RENAME ${brandedName})
  10. ENDFOREACH(file)
  11. ENDFOREACH(size)
  12. endif()