aboutsummaryrefslogtreecommitdiff
path: root/modules/KDE4Macros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/KDE4Macros.cmake')
-rw-r--r--modules/KDE4Macros.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 87acc626..cf7d769f 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -15,6 +15,7 @@
# KDE4_ADD_TEST_EXECUTABLE
# KDE4_ADD_EXECUTABLE
# KDE4_ADD_WIDGET_FILES
+# KDE4_UPDATE_ICONCACHE
# KDE4_INSTALL_ICONS
# KDE4_REMOVE_OBSOLETE_CMAKE_FILES
# KDE4_NO_ENABLE_FINAL
@@ -323,6 +324,14 @@ macro (KDE4_CREATE_HTML_HANDBOOK _docbook)
endmacro (KDE4_CREATE_HTML_HANDBOOK)
+macro (KDE4_UPDATE_ICONCACHE)
+ # Update mtime of hicolor icon theme dir.
+ # We don't always have touch command (e.g. on Windows), so instead create
+ # and delete a temporary file in the theme dir.
+ install(CODE "file(WRITE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\" \"update\")")
+ install(CODE "file(REMOVE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\")")
+endmacro (KDE4_UPDATE_ICONCACHE)
+
# a "map" of short type names to the directories
# unknown names should give empty results
# KDE 3 compatibility
@@ -412,6 +421,8 @@ macro (KDE4_INSTALL_ICONS _defaultpath )
endif( _theme_GROUP)
endforeach (_current_ICON)
+ KDE4_UPDATE_ICONCACHE()
+
endmacro (KDE4_INSTALL_ICONS)