From 5621e209fbb88b6acb00a394f4ec989e422dbd42 Mon Sep 17 00:00:00 2001 From: Tasos Sahanidis Date: Tue, 23 Jul 2019 19:55:36 +0300 Subject: [PATCH] Write the XDG dummy only under safe install --- src/gui/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 635974e4..16810500 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -480,13 +480,15 @@ elseif (LINUX) GROUP_READ WORLD_READ) - # We need to use file(WRITE) because TOUCH was added way too late - # xdg-icon-resource does this to force a cache update - # Should be enough for all modern desktops - install( - CODE - "file(WRITE \"${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/.xdg-icon-resource-dummy\" \"\") - file(REMOVE \"${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/.xdg-icon-resource-dummy\")") + if (SAFE_INSTALL) + # We need to use file(WRITE) because TOUCH was added way too late + # xdg-icon-resource does this to force a cache update + # Should be enough for all modern desktops + install( + CODE + "file(WRITE \"${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/.xdg-icon-resource-dummy\" \"\") + file(REMOVE \"${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/.xdg-icon-resource-dummy\")") + endif () install( FILES "${CMAKE_CURRENT_BINARY_DIR}/ckb-next.desktop"