From 05f030a4a13b3d9d473bfd7f2b74b45067509deb Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Tue, 24 Jul 2007 21:56:42 +0000 Subject: Make KDE4_UPDATE_ICONCACHE() no-op if DESTDIR is set svn path=/trunk/KDE/kdelibs/; revision=692029 --- modules/KDE4Macros.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules') 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 -- cgit v1.2.1