diff options
author | R.J.V. Bertin <rjvbertin@gmail.com> | 2017-01-10 12:33:49 +0100 |
---|---|---|
committer | R.J.V. Bertin <rjvbertin@gmail.com> | 2017-01-10 12:33:49 +0100 |
commit | 1915787b80ed8fada9ee78d0b150d7a71e6db7fc (patch) | |
tree | 70e1ddf3c3935d720f8dfb8c57b5e340afe1f4ac /modules/ECMAddAppIcon.cmake | |
parent | 0b4f9d5fd47956b1cb432056330dd6917789c367 (diff) | |
download | extra-cmake-modules-1915787b80ed8fada9ee78d0b150d7a71e6db7fc.tar.gz extra-cmake-modules-1915787b80ed8fada9ee78d0b150d7a71e6db7fc.tar.bz2 |
ecm_add_app_icon : ignore SVG files silently when unsupported
SVG files that fail to convert will still trigger a warning.
Diffstat (limited to 'modules/ECMAddAppIcon.cmake')
-rw-r--r-- | modules/ECMAddAppIcon.cmake | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/ECMAddAppIcon.cmake b/modules/ECMAddAppIcon.cmake index e7adc405..3e609d34 100644 --- a/modules/ECMAddAppIcon.cmake +++ b/modules/ECMAddAppIcon.cmake @@ -135,14 +135,16 @@ function(ecm_add_app_icon appsources) _dummy "${icon_name}") set(size "${CMAKE_MATCH_1}") set(ext "${CMAKE_MATCH_2}") - if (NOT size) - message(AUTHOR_WARNING "${icon_full} is not named correctly for ecm_add_app_icon - ignoring") - elseif (NOT ext STREQUAL "png") - message(AUTHOR_WARNING "${icon_full} is not a png file - ignoring") - else() - list(FIND known_sizes "${size}" offset) - if (offset GREATER -1) - list(APPEND icons_at_${size}px "${icon_full}") + if (NOT (ext STREQUAL "svg" OR ext STREQUAL "svgz")) + if (NOT size) + message(AUTHOR_WARNING "${icon_full} is not named correctly for ecm_add_app_icon - ignoring") + elseif (NOT ext STREQUAL "png") + message(AUTHOR_WARNING "${icon_full} is not a png file - ignoring") + else() + list(FIND known_sizes "${size}" offset) + if (offset GREATER -1) + list(APPEND icons_at_${size}px "${icon_full}") + endif() endif() endif() endif() |