aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRivo Laks <rivolaks@hot.ee>2007-07-24 21:56:42 +0000
committerRivo Laks <rivolaks@hot.ee>2007-07-24 21:56:42 +0000
commit05f030a4a13b3d9d473bfd7f2b74b45067509deb (patch)
tree23a9b108652e8e6c173f9578c9e92a79042f3a20 /modules
parent820f870c30d2c33ec9af47237573e44c526d406f (diff)
downloadextra-cmake-modules-05f030a4a13b3d9d473bfd7f2b74b45067509deb.tar.gz
extra-cmake-modules-05f030a4a13b3d9d473bfd7f2b74b45067509deb.tar.bz2
Make KDE4_UPDATE_ICONCACHE() no-op if DESTDIR is set
svn path=/trunk/KDE/kdelibs/; revision=692029
Diffstat (limited to 'modules')
-rw-r--r--modules/KDE4Macros.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index cf7d769f..3b957308 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -328,8 +328,13 @@ 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\")")
+ install(CODE "
+ set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
+ if (NOT DESTDIR_VALUE)
+ file(WRITE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\" \"update\")
+ file(REMOVE \"${ICON_INSTALL_DIR}/hicolor/temp.txt\")
+ endif (NOT DESTDIR_VALUE)
+ ")
endmacro (KDE4_UPDATE_ICONCACHE)
# a "map" of short type names to the directories