[kde-common/cmake] tde_install_icons: detect locolor theme icons; ignoring icons with invalid names

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/cmake@1187287 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
pull/1/head
samelian 14 years ago
parent c27380d065
commit 6d2a066317

@ -65,41 +65,48 @@ macro( tde_install_icons )
set( _group "${CMAKE_MATCH_3}" ) set( _group "${CMAKE_MATCH_3}" )
set( _name "${CMAKE_MATCH_4}" ) set( _name "${CMAKE_MATCH_4}" )
# autodetect theme # we must ignore invalid icon names
if( NOT _req_theme ) if( _type AND _size AND _group AND _name )
if( "${_type}" STREQUAL "cr" )
set( _theme crystalsvg ) # autodetect theme
endif( "${_type}" STREQUAL "cr" ) if( NOT _req_theme )
# defaulting if( "${_type}" STREQUAL "cr" )
if( NOT _theme ) set( _theme crystalsvg )
set( _theme hicolor ) elseif( "${_type}" STREQUAL "lo" )
endif( NOT _theme ) set( _theme locolor )
else( NOT _req_theme ) endif( "${_type}" STREQUAL "cr" )
set( _theme ${_req_theme} ) # defaulting
endif( NOT _req_theme ) if( NOT _theme )
set( _theme hicolor )
# fix "group" name endif( NOT _theme )
if( "${_group}" STREQUAL "mime" ) else( NOT _req_theme )
set( _group "mimetypes" ) set( _theme ${_req_theme} )
endif( "${_group}" STREQUAL "mime" ) endif( NOT _req_theme )
if( "${_group}" STREQUAL "filesys" )
set( _group "filesystems" ) # fix "group" name
endif( "${_group}" STREQUAL "filesys" ) if( "${_group}" STREQUAL "mime" )
if( "${_group}" STREQUAL "device" ) set( _group "mimetypes" )
set( _group "devices" ) endif( "${_group}" STREQUAL "mime" )
endif( "${_group}" STREQUAL "device" ) if( "${_group}" STREQUAL "filesys" )
if( "${_group}" STREQUAL "app" ) set( _group "filesystems" )
set( _group "apps" ) endif( "${_group}" STREQUAL "filesys" )
endif( "${_group}" STREQUAL "app" ) if( "${_group}" STREQUAL "device" )
if( "${_group}" STREQUAL "action" ) set( _group "devices" )
set( _group "actions" ) endif( "${_group}" STREQUAL "device" )
endif( "${_group}" STREQUAL "action" ) if( "${_group}" STREQUAL "app" )
set( _group "apps" )
if( "${_size}" STREQUAL "sc" ) endif( "${_group}" STREQUAL "app" )
install( FILES ${_icon_file} DESTINATION ${_dest}/${_theme}/scalable/${_group}/ RENAME ${_name} ) if( "${_group}" STREQUAL "action" )
else( "${_size}" STREQUAL "sc" ) set( _group "actions" )
install( FILES ${_icon_file} DESTINATION ${_dest}/${_theme}/${_size}x${_size}/${_group}/ RENAME ${_name} ) endif( "${_group}" STREQUAL "action" )
endif( "${_size}" STREQUAL "sc" )
if( "${_size}" STREQUAL "sc" )
install( FILES ${_icon_file} DESTINATION ${_dest}/${_theme}/scalable/${_group}/ RENAME ${_name} )
else( "${_size}" STREQUAL "sc" )
install( FILES ${_icon_file} DESTINATION ${_dest}/${_theme}/${_size}x${_size}/${_group}/ RENAME ${_name} )
endif( "${_size}" STREQUAL "sc" )
endif( _type AND _size AND _group AND _name )
endforeach( _icon_file ) endforeach( _icon_file )
endforeach( _icon ) endforeach( _icon )

Loading…
Cancel
Save