aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/KDE4Macros.cmake81
1 files changed, 69 insertions, 12 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 40513c02..acf82128 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -223,23 +223,80 @@ MACRO (KDE4_INSTALL_ICONS _defaultpath _theme )
# first the png icons
FILE(GLOB _icons *.png)
foreach (_current_ICON ${_icons} )
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _size "${_current_ICON}")
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\2" _group "${_current_ICON}")
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\3" _name "${_current_ICON}")
- _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
- ${_defaultpath}/${_theme}/${_size}x${_size}
- ${_group} ${_current_ICON} ${_name})
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _type "${_current_ICON}")
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\2" _size "${_current_ICON}")
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\3" _group "${_current_ICON}")
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\4" _name "${_current_ICON}")
+
+ if( ${_type} STREQUAL "cr" )
+ if(${_theme} STREQUAL "crystalsvg" )
+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
+ ${_defaultpath}/${_theme}/${_size}x${_size}
+ ${_group} ${_current_ICON} ${_name})
+ #else(${_theme} STREQUAL "crystalsvg" )
+ #MESSAGE(STATUS "icon : ${_current_ICON} is not put into good theme directory ${_theme}")
+ endif(${_theme} STREQUAL "crystalsvg" )
+ endif(${_type} STREQUAL "cr" )
+
+ if( ${_type} STREQUAL "lo" )
+ if(${_theme} STREQUAL "locolor" )
+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
+ ${_defaultpath}/${_theme}/${_size}x${_size}·
+ ${_group} ${_current_ICON} ${_name})
+ #else(${_theme} STREQUAL "locolor" )
+ # MESSAGE(STATUS "icon : ${_current_ICON} is not put into good theme directory ${_theme}")
+ endif(${_theme} STREQUAL "locolor" )
+ endif(${_type} STREQUAL "lo" )
+
+ if( ${_type} STREQUAL "hi" )
+ if( ${_theme} STREQUAL "hicolor" )
+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
+ ${_defaultpath}/${_theme}/${_size}x${_size}·
+ ${_group} ${_current_ICON} ${_name})
+ #else(${_theme} STREQUAL "hicolor" )
+ # MESSAGE(STATUS "icon : ${_current_ICON} is not put into good theme directory ${_theme}")
+ endif(${_theme} STREQUAL "hicolor" )
+ endif(${_type} STREQUAL "hi" )
+
ENDforeach (_current_ICON)
# mng icons
FILE(GLOB _icons *.mng)
foreach (_current_ICON ${_icons} )
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\1" _size "${_current_ICON}")
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\2" _group "${_current_ICON}")
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\3" _name "${_current_ICON}")
- _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
- ${_defaultpath}/${_theme}/${_size}x${_size}
- ${_group} ${_current_ICON} ${_name})
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _type "${_current_ICON}")
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\2" _size "${_current_ICON}")
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\3" _group "${_current_ICON}")
+ STRING(REGEX REPLACE "^.*/([a-zA-Z]+)([0-9]+)\\-([a-z]+)\\-(.+\\.mng)$" "\\4" _name "${_current_ICON}")
+ if( ${_type} STREQUAL "cr" )
+ if( ${_theme} STREQUAL "crystalsvg" )
+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
+ ${_defaultpath}/${_theme}/${_size}x${_size}
+ ${_group} ${_current_ICON} ${_name})
+ #else( ${_theme} STREQUAL "crystalsvg" )
+ #MESSAGE(STATUS "icon : ${_current_ICON} is not put into good theme directory ${_theme}")
+ endif( ${_theme} STREQUAL "crystalsvg" )
+ endif(${_type} STREQUAL "cr" )
+
+ if( ${_type} STREQUAL "lo" )
+ if( ${_theme} STREQUAL "locolor" )
+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
+ ${_defaultpath}/${_theme}/${_size}x${_size}
+ ${_group} ${_current_ICON} ${_name})
+ #else(${_theme} STREQUAL "locolor" )
+ # MESSAGE(STATUS "icon : ${_current_ICON} is not put into good theme directory ${_theme}")
+ endif(${_theme} STREQUAL "locolor" )
+ endif(${_type} STREQUAL "lo" )
+
+ if( ${_type} STREQUAL "hi" )
+ if(${_theme} STREQUAL "hicolor" )
+ _KDE4_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
+ ${_defaultpath}/${_theme}/${_size}x${_size}
+ ${_group} ${_current_ICON} ${_name})
+ else(${_theme} STREQUAL "hicolor" )
+ # MESSAGE(STATUS "icon : ${_current_ICON} is not put into good theme directory ${_theme}")
+ #endif(${_theme} STREQUAL "hicolor" )
+ endif(${_type} STREQUAL "hi" )
+
ENDforeach (_current_ICON)