Commit 0404f24d authored by Antenore Gatta's avatar Antenore Gatta

Gtk icon cache update during install phase

parent 48903068
......@@ -50,6 +50,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include(FindOptionalPackage)
include(ConfigOptions)
include(GtkUpdateIconCache)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
......
# Copyright 2015 Volker Krause <vkrause@kde.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
find_program(GTK_UPDATE_ICON_CACHE_EXEC NAMES gtk-update-icon-cache)
macro(gtk_update_icon_cache _dir)
if (GTK_UPDATE_ICON_CACHE_EXEC)
install(CODE "
set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
if (NOT DESTDIR_VALUE)
execute_process(COMMAND ${GTK_UPDATE_ICON_CACHE_EXEC} -qfit ${_dir})
endif()
")
endif()
endmacro()
......@@ -84,6 +84,8 @@ install(FILES ${ICON128_DATA} DESTINATION ${ICON128_DIR})
install(FILES ${ICON256_DATA} DESTINATION ${ICON256_DIR})
install(FILES ${ICONSVG_DATA} DESTINATION ${ICONSVG_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
set(REMMINA_BINARY_PATH ${CMAKE_INSTALL_FULL_BINDIR}/remmina)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${REMMINA_APP_ID}.desktop.in
......
......@@ -67,3 +67,4 @@ set(APPICONSCALE_EMBLEMS_DATA
install(FILES ${APPICONSCALE_ACTIONS_DATA} DESTINATION ${APPICONSCALE_ACTIONS_DIR})
install(FILES ${APPICONSCALE_EMBLEMS_DATA} DESTINATION ${APPICONSCALE_EMBLEMS_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
......@@ -60,3 +60,5 @@ install(TARGETS remmina-plugin-nx DESTINATION ${REMMINA_PLUGINDIR})
install(FILES
scalable/emblems/remmina-nx-symbolic.svg
DESTINATION ${APPICONSCALE_EMBLEMS_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
......@@ -72,3 +72,5 @@ install(FILES
scalable/emblems/remmina-rdp-ssh-symbolic.svg
scalable/emblems/remmina-rdp-symbolic.svg
DESTINATION ${APPICONSCALE_EMBLEMS_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
......@@ -49,3 +49,5 @@ install(FILES
scalable/emblems/remmina-spice-ssh-symbolic.svg
scalable/emblems/remmina-spice-symbolic.svg
DESTINATION ${APPICONSCALE_EMBLEMS_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
......@@ -49,3 +49,5 @@ install(TARGETS remmina-plugin-st DESTINATION ${REMMINA_PLUGINDIR})
install(FILES
scalable/emblems/remmina-tool-symbolic.svg
DESTINATION ${APPICONSCALE_EMBLEMS_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
......@@ -50,3 +50,5 @@ install(FILES
scalable/emblems/remmina-vnc-ssh-symbolic.svg
scalable/emblems/remmina-vnc-symbolic.svg
DESTINATION ${APPICONSCALE_EMBLEMS_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
......@@ -48,3 +48,5 @@ install(FILES
scalable/emblems/remmina-xdmcp-ssh-symbolic.svg
scalable/emblems/remmina-xdmcp-symbolic.svg
DESTINATION ${APPICONSCALE_EMBLEMS_DIR})
gtk_update_icon_cache("${REMMINA_DATADIR}/icons/hicolor")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment