aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/ECMAddAppIcon.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/ECMAddAppIcon.cmake b/modules/ECMAddAppIcon.cmake
index 5233a5f1..ca643142 100644
--- a/modules/ECMAddAppIcon.cmake
+++ b/modules/ECMAddAppIcon.cmake
@@ -83,21 +83,23 @@ function(ecm_add_app_icon appsources)
endforeach()
foreach(icon ${ARG_ICONS})
- if (NOT EXISTS "${icon}")
- message(AUTHOR_WARNING "${icon} does not exist, ignoring")
+ 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(icon_name ${icon} NAME)
string(REGEX MATCH "([0-9]+)\\-[^/]+\\.([a-z]+)$"
- _dummy "${icon}")
+ _dummy "${icon_name}")
set(size "${CMAKE_MATCH_1}")
set(ext "${CMAKE_MATCH_2}")
if (NOT size)
- message(AUTHOR_WARNING "${icon} is not named correctly for ecm_add_app_icon - ignoring")
+ message(AUTHOR_WARNING "${icon_full} is not named correctly for ecm_add_app_icon - ignoring")
elseif (NOT ext STREQUAL "png")
- message(AUTHOR_WARNING "${icon} is not a png file - ignoring")
+ 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}")
+ list(APPEND icons_at_${size}px "${icon_full}")
endif()
endif()
endif()