diff options
author | Laurent Montel <montel@kde.org> | 2006-02-03 13:59:02 +0000 |
---|---|---|
committer | Laurent Montel <montel@kde.org> | 2006-02-03 13:59:02 +0000 |
commit | ec20af3748c658bd51630c39a4426950b9ca8270 (patch) | |
tree | 5c63735b31daa2a338e57a0c83007523643a0c92 | |
parent | 7771ccf599f598da22aefc9dfbfdc06787bc0435 (diff) | |
download | extra-cmake-modules-ec20af3748c658bd51630c39a4426950b9ca8270.tar.gz extra-cmake-modules-ec20af3748c658bd51630c39a4426950b9ca8270.tar.bz2 |
Install scalable icons
svn path=/trunk/KDE/kdelibs/; revision=505212
-rw-r--r-- | modules/KDE4Macros.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 259e2924..91ded6d4 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -323,6 +323,38 @@ MACRO(KDE4_INSTALL_ICONS _theme) FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake "CONFIGURE_FILE( ${_current_ICON} ${_ICON_INSTALL_NAME} COPYONLY) \n") ENDFOREACH (_current_ICON) + FILE(GLOB _icons *.svgz) + FOREACH(_current_ICON ${_icons} ) + STRING(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\1" _group "${_current_ICON}") + STRING(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\2" _name "${_current_ICON}") + + SET(_icon_GROUP "actions") + + IF(${_group} STREQUAL "mime") + SET(_icon_GROUP "mimetypes") + ENDIF(${_group} STREQUAL "mime") + + IF(${_group} STREQUAL "filesys") + SET(_icon_GROUP "filesystems") + ENDIF(${_group} STREQUAL "filesys") + + IF(${_group} STREQUAL "device") + SET(_icon_GROUP "devices") + ENDIF(${_group} STREQUAL "device") + + IF(${_group} STREQUAL "app") + SET(_icon_GROUP "apps") + ENDIF(${_group} STREQUAL "app") + + IF(${_group} STREQUAL "action") + SET(_icon_GROUP "actions") + ENDIF(${_group} STREQUAL "action") + + SET(_ICON_INSTALL_NAME ${CMAKE_INSTALL_PREFIX}/share/icons/${_theme}/scalable/${_icon_GROUP}/${_name}) + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake "MESSAGE(STATUS \"Installing ${_ICON_INSTALL_NAME}\") \n") + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake "CONFIGURE_FILE( ${_current_ICON} ${_ICON_INSTALL_NAME} COPYONLY) \n") + + ENDFOREACH (_current_ICON) ENDMACRO(KDE4_INSTALL_ICONS _theme) # for the case that something should be added to every CMakeLists.txt at the top |