diff --git a/modules/ECMAddAppIcon.cmake b/modules/ECMAddAppIcon.cmake --- a/modules/ECMAddAppIcon.cmake +++ b/modules/ECMAddAppIcon.cmake @@ -138,6 +138,27 @@ endforeach() endif() + if(ANDROID) + foreach(icon ${ARG_ICONS}) + get_filename_component(icon_full ${icon} ABSOLUTE) + if (NOT EXISTS "${icon_full}") + message(AUTHOR_WARNING "${icon_full} does not exist, ignoring") + else() + get_filename_component(filename "${icon}" NAME) + string(REGEX MATCH "([0-9sc]+)\\-([a-z]+)\\-([^/]+)\\.([a-z]+)$" + complete_match "${filename}") + set(size "${CMAKE_MATCH_1}") + set(group "${CMAKE_MATCH_2}") + set(name "${CMAKE_MATCH_3}") + set(ext "${CMAKE_MATCH_4}") + if(NOT ${icon_type} STREQUAL ".svg" OR NOT ${icon_type} STREQUAL ".svgz") + message(AUTHOR_WARNING "${icon_full} is not a SVG file - ignoring") + else() + install(FILES ${icon_full} DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2/icons/ RENAME "${name}.${ext}") + endif() + endif() + endforeach() + endif() _ecm_add_app_icon_categorize_icons("${ARG_ICONS}" "icons" "16;24;32;48;64;128;256;512;1024") if(ARG_SIDEBAR_ICONS)