From 21629f651a6a5d9d977be03fd9f98417c4fa27ae Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Tue, 3 Nov 2015 12:00:44 +0000 Subject: Warn instead of error if ecm_install_icons finds no icons. The V1 syntax of ecm_install_icons searched for icons by globbing files with a particular naming pattern. If there were no such icons, this used to do nothing, but silently. Commit fb7b8eea7d accidentally made this an error. More sensible would be to make it a warning. BUG: 354610 REVIEW: 125931 --- modules/ECMInstallIcons.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'modules/ECMInstallIcons.cmake') diff --git a/modules/ECMInstallIcons.cmake b/modules/ECMInstallIcons.cmake index 8db486e7..549ebe19 100644 --- a/modules/ECMInstallIcons.cmake +++ b/modules/ECMInstallIcons.cmake @@ -169,10 +169,14 @@ macro(_ecm_install_icons_v1 _defaultpath) endif( _theme_GROUP) endforeach (_current_ICON) - list(REMOVE_DUPLICATES _themes) - foreach(_theme ${_themes}) - _ecm_update_iconcache("${_defaultpath}" "${_theme}") - endforeach() + if (_themes) + list(REMOVE_DUPLICATES _themes) + foreach(_theme ${_themes}) + _ecm_update_iconcache("${_defaultpath}" "${_theme}") + endforeach() + else() + message(AUTHOR_WARNING "No suitably-named icons found") + endif() endmacro() -- cgit v1.2.1