diff options
-rw-r--r-- | modules/ECMInstallIcons.cmake | 12 | ||||
-rw-r--r-- | tests/ECMInstallIconsTest/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt | 1 |
3 files changed, 10 insertions, 4 deletions
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() diff --git a/tests/ECMInstallIconsTest/CMakeLists.txt b/tests/ECMInstallIconsTest/CMakeLists.txt index 738cba91..f048889e 100644 --- a/tests/ECMInstallIconsTest/CMakeLists.txt +++ b/tests/ECMInstallIconsTest/CMakeLists.txt @@ -10,6 +10,7 @@ include(ECMInstallIcons) add_subdirectory(v1-syntax) add_subdirectory(v1-syntax-l10n) +add_subdirectory(v1-syntax-no-icons) ecm_install_icons( ICONS 16-actions-computer.png diff --git a/tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt b/tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt new file mode 100644 index 00000000..e0cacec2 --- /dev/null +++ b/tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt @@ -0,0 +1 @@ +ecm_install_icons(v1-icons-dummy) |