[cmake-developers] cmake-gui icons

Richard Shaw hobbes1069 at gmail.com
Tue Oct 28 12:45:50 EDT 2014


On Tue, Oct 28, 2014 at 11:27 AM, Orion Poplawski <orion at cora.nwra.com>
wrote:

> There should be a series in:
>
> /usr/share/icons/hicolor/XxX/apps/CMakeSetup.png
>
> Where XxX is the resolution, eg: 32x32, 48x48,... :
>
> ls /usr/share/icons/hicolor
> 128x128  192x192  22x22  256x256  36x36  512x512  72x72
> 16x16    20x20    24x24  32x32    48x48  64x64    96x96
>
> You don't need all of them, but a selection is nice.
>
> SVG/svgz is nice too, and that goes in "scalable".
>

I do this within the RPM spec file for packages I maintain which don't do
this for me but the idea should work the same for CMake, something like:

if(UNIX) # Or any other qualifiers/tests needed...
    include(GNUInstallDirs)
    set(ICON_INSTALL_PREFIX} "${CMAKE_INSTALL_DATADIR}/icons/hicolor")
    set(ICON_SIZES "32x32;64x64;128x128")

    foreach(_size ICON_SIZES)
        install(FILES CMakeSetup${_size}.png
            DESTINATION ${ICON_INSTALL_PREFIX}/${_size}/apps
            RENAME CMakeSetup.png)
    endforeach()

    install(FILES CMakeSetup.svg DESTINATION
${ICON_INSTALL_PREFIX}/scalable/apps)
endif()

This assumes the icon size is appended to the base name.

I haven't tested this and it may well have typos but I would think this
would work.

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141028/37bff773/attachment.html>


More information about the cmake-developers mailing list