Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2020-11-03 18:58:47 +0300
committerHannah von Reth <vonreth@kde.org>2020-11-04 19:21:52 +0300
commit0d1fa8177acc5b61ebd3bdc2555769226282891d (patch)
tree1b8e419ca7292824636613b5d51afe9a54a33158 /src/gui/CMakeLists.txt
parent770ae130f35024f8564c5ae136a3c46d5cd07686 (diff)
Support legacy naming of app icon
Diffstat (limited to 'src/gui/CMakeLists.txt')
-rw-r--r--src/gui/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 3736a268b..1568d1dc5 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -219,8 +219,21 @@ else()
endif()
# add executable icon on windows and osx
-
file(GLOB_RECURSE OWNCLOUD_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-icon.png")
+if (NOT OWNCLOUD_ICONS)
+ # allow legacy file names
+ file(GLOB_RECURSE OWNCLOUD_ICONS_OLD "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon-*.png")
+ MESSAGE(STATUS "OWNCLOUD_ICONS_OLD: ${APPLICATION_ICON_NAME}: ${OWNCLOUD_ICONS_OLD}")
+ foreach(icon ${OWNCLOUD_ICONS_OLD})
+ get_filename_component(icon_name ${icon} NAME)
+ string(REGEX MATCH "([0-9]+)" size ${icon_name})
+ set(out_name "${CMAKE_BINARY_DIR}/${size}-app-icon.png")
+ configure_file(${icon} ${out_name} COPYONLY)
+ list(APPEND OWNCLOUD_ICONS ${out_name})
+ endforeach()
+endif()
+MESSAGE(STATUS "OWNCLOUD_ICONS: ${APPLICATION_ICON_NAME}: ${OWNCLOUD_ICONS}")
+
if(APPLE)
file(GLOB_RECURSE OWNCLOUD_SIDEBAR_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-icon-sidebar.png")
MESSAGE(STATUS "OWNCLOUD_SIDEBAR_ICONS: ${APPLICATION_ICON_NAME}: ${OWNCLOUD_SIDEBAR_ICONS}")