
set(iconthemes mono )
set(installThemeDir ${ICON_INSTALL_DIR}/ )

set(typeIcons actions  apps  devices  filesystems  mimetypes)

set(sizeIcon 128x128 16x16 192x192 22x22 256x256 32x32  48x48   64x64   96x96)

foreach (_currentthemedir ${iconthemes})
        install(FILES ${_currentthemedir}/index.theme DESTINATION ${installThemeDir}/${_currentthemedir} )

        foreach(_currentsize ${sizeIcon})
                foreach(_currenttypeicon ${typeIcons})
                        FILE(GLOB _pngfile "${_currentthemedir}/png/${_currentsize}/${_currenttypeicon}/*.png" )
                        install(FILES ${_pngfile} DESTINATION ${installThemeDir}/${_currentthemedir}/${_currentsize}/${_currenttypeicon})
                        FILE(GLOB _mngfile "${_currentthemedir}/png/${_currentsize}/${_currenttypeicon}/*.mng")
                        install(FILES ${_mngfile} DESTINATION ${installThemeDir}/${_currentthemedir}/${_currentsize}/${_currenttypeicon})
                        FILE(GLOB _svgfile "${_currentthemedir}/png/${_currentsize}/${_currenttypeicon}/*.svgz")
                        install(FILES ${_svgfile} DESTINATION ${installThemeDir}/${_currentthemedir}/${_currentsize}/${_currenttypeicon}) 
                endforeach(_currenttypeicon ${typeIcons})

        endforeach(_currentsize ${sizeIcon})

	foreach(_currenttypeicon ${typeIcons})
                        FILE(GLOB _pngfile "${_currentthemedir}/scalable/${_currenttypeicon}/*.png" )
                        install(FILES ${_pngfile} DESTINATION ${installThemeDir}/${_currentthemedir}/scalable/${_currenttypeicon})
                        FILE(GLOB _mngfile "${_currentthemedir}/scalable/${_currenttypeicon}/*.mng")
                        install(FILES ${_mngfile} DESTINATION ${installThemeDir}/${_currentthemedir}/scalable/${_currenttypeicon})
                        FILE(GLOB _svgfile "${_currentthemedir}/scalable/${_currenttypeicon}/*.svgz")
                        install(FILES ${_svgfile} DESTINATION ${installThemeDir}/${_currentthemedir}/scalable/${_currenttypeicon})
        endforeach(_currenttypeicon ${typeIcons})


endforeach(_currentthemedir ${iconthemes})
