summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-18 21:13:29 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-18 21:13:29 +0000
commit6d2a0663172392c3bc035029049721bff8e953be (patch)
tree3add562219e26f94f148aa3cf74dbcc2098c49a2 /modules
parentc27380d0657c897d59135807e74ae8e133e9449b (diff)
downloadtde-cmake-6d2a0663172392c3bc035029049721bff8e953be.tar.gz
tde-cmake-6d2a0663172392c3bc035029049721bff8e953be.zip
[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
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEMacros.cmake77
1 files changed, 42 insertions, 35 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index b0d359b..4363f36 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -65,41 +65,48 @@ macro( tde_install_icons )
set( _group "${CMAKE_MATCH_3}" )
set( _name "${CMAKE_MATCH_4}" )
- # autodetect theme
- if( NOT _req_theme )
- if( "${_type}" STREQUAL "cr" )
- set( _theme crystalsvg )
- endif( "${_type}" STREQUAL "cr" )
- # defaulting
- if( NOT _theme )
- set( _theme hicolor )
- endif( NOT _theme )
- else( NOT _req_theme )
- set( _theme ${_req_theme} )
- endif( NOT _req_theme )
-
- # fix "group" name
- if( "${_group}" STREQUAL "mime" )
- set( _group "mimetypes" )
- endif( "${_group}" STREQUAL "mime" )
- if( "${_group}" STREQUAL "filesys" )
- set( _group "filesystems" )
- endif( "${_group}" STREQUAL "filesys" )
- if( "${_group}" STREQUAL "device" )
- set( _group "devices" )
- endif( "${_group}" STREQUAL "device" )
- if( "${_group}" STREQUAL "app" )
- set( _group "apps" )
- endif( "${_group}" STREQUAL "app" )
- if( "${_group}" STREQUAL "action" )
- set( _group "actions" )
- endif( "${_group}" STREQUAL "action" )
-
- 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" )
+ # we must ignore invalid icon names
+ if( _type AND _size AND _group AND _name )
+
+ # autodetect theme
+ if( NOT _req_theme )
+ if( "${_type}" STREQUAL "cr" )
+ set( _theme crystalsvg )
+ elseif( "${_type}" STREQUAL "lo" )
+ set( _theme locolor )
+ endif( "${_type}" STREQUAL "cr" )
+ # defaulting
+ if( NOT _theme )
+ set( _theme hicolor )
+ endif( NOT _theme )
+ else( NOT _req_theme )
+ set( _theme ${_req_theme} )
+ endif( NOT _req_theme )
+
+ # fix "group" name
+ if( "${_group}" STREQUAL "mime" )
+ set( _group "mimetypes" )
+ endif( "${_group}" STREQUAL "mime" )
+ if( "${_group}" STREQUAL "filesys" )
+ set( _group "filesystems" )
+ endif( "${_group}" STREQUAL "filesys" )
+ if( "${_group}" STREQUAL "device" )
+ set( _group "devices" )
+ endif( "${_group}" STREQUAL "device" )
+ if( "${_group}" STREQUAL "app" )
+ set( _group "apps" )
+ endif( "${_group}" STREQUAL "app" )
+ if( "${_group}" STREQUAL "action" )
+ set( _group "actions" )
+ endif( "${_group}" STREQUAL "action" )
+
+ 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 )