diff options
| author | Chusslove Illich <caslav.ilic@gmx.net> | 2008-01-29 08:35:30 +0000 | 
|---|---|---|
| committer | Chusslove Illich <caslav.ilic@gmx.net> | 2008-01-29 08:35:30 +0000 | 
| commit | bcd5fdef70451265c32438238131962ed23f69c8 (patch) | |
| tree | 8ed8e1be91bf636bd1b00a7d71f8e4bd4f91a295 /modules/KDE4Macros.cmake | |
| parent | 542ce625fe5ab6bbfbfe1ea8a8909695f5cf7788 (diff) | |
| download | extra-cmake-modules-bcd5fdef70451265c32438238131962ed23f69c8.tar.gz extra-cmake-modules-bcd5fdef70451265c32438238131962ed23f69c8.tar.bz2 | |
Add support to install localized icons.
svn path=/trunk/KDE/kdelibs/; revision=768063
Diffstat (limited to 'modules/KDE4Macros.cmake')
| -rw-r--r-- | modules/KDE4Macros.cmake | 20 | 
1 files changed, 14 insertions, 6 deletions
| diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 4d103d5e..b449b05e 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -406,7 +406,7 @@ set(_KDE4_ICON_THEME_hi "hicolor")  # only used internally by KDE4_INSTALL_ICONS -macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME) +macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME _l10n_SUBDIR)     # if the string doesn't match the pattern, the result is the full string, so all three have the same content     if (NOT ${_group} STREQUAL ${_install_NAME} ) @@ -414,8 +414,8 @@ macro (_KDE4_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NA        if(NOT _icon_GROUP)           set(_icon_GROUP "actions")        endif(NOT _icon_GROUP) -#      message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name}" ) -      install(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/ RENAME ${_install_NAME} ) +#      message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name} l10n: ${_l10n_SUBDIR}") +      install(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/${_l10n_SUBDIR}/ RENAME ${_install_NAME} )     endif (NOT ${_group} STREQUAL ${_install_NAME} )  endmacro (_KDE4_ADD_ICON_INSTALL_RULE) @@ -423,6 +423,14 @@ endmacro (_KDE4_ADD_ICON_INSTALL_RULE)  macro (KDE4_INSTALL_ICONS _defaultpath ) +   # the l10n-subdir if language given as second argument (localized icon) +   set(_lang ${ARGV1}) +   if(_lang) +      set(_l10n_SUBDIR l10n/${_lang}) +   else(_lang) +      set(_l10n_SUBDIR ".") +   endif(_lang) +     # first the png icons     file(GLOB _icons *.png)     foreach (_current_ICON ${_icons} ) @@ -435,7 +443,7 @@ macro (KDE4_INSTALL_ICONS _defaultpath )        if( _theme_GROUP)           _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake                      ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} -                    ${_group} ${_current_ICON} ${_name}) +                    ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR})        endif( _theme_GROUP)     endforeach (_current_ICON) @@ -451,7 +459,7 @@ macro (KDE4_INSTALL_ICONS _defaultpath )        if( _theme_GROUP)           _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake                  ${_defaultpath}/${_theme_GROUP}/${_size}x${_size} -                ${_group} ${_current_ICON} ${_name}) +                ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR})        endif( _theme_GROUP)     endforeach (_current_ICON) @@ -466,7 +474,7 @@ macro (KDE4_INSTALL_ICONS _defaultpath )        if( _theme_GROUP)            _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake                              ${_defaultpath}/${_theme_GROUP}/scalable -                            ${_group} ${_current_ICON} ${_name}) +                            ${_group} ${_current_ICON} ${_name} ${_l10n_SUBDIR})        endif( _theme_GROUP)     endforeach (_current_ICON) | 
