[PATCH] Mac OS X application icon support

Alexander Neundorf neundorf at kde.org
Sat Dec 29 15:12:45 GMT 2007

On Saturday 29 December 2007, Christian Ehrlicher wrote:
> Ralf Habacker schrieb:
> > Harald Fernengel schrieb:
> >> Hash: SHA1
> >>
> >> Hi,
> >>
> >> similarly to KDE4_ADD_WIN32_APP_ICON, this patch adds a
> >> KDE4_ADD_MACOSX_APP_ICON to KDE4Macros.cmake, so KDE applications
> >> won't have the boring default icon when opened in Finder.
> >>
> >> Unfortunately, I can't reuse the WIN32_APP_ICON macro, since on
> >> Windows, the app icon is 32x32 and it's compiled into the binary,
> >> whereas on Mac, it's usually 128x128 and copied into the application
> >> bundle at install time.

Ok, we are in deep freeze, so actually this is too late.
I know it doesn't make any sense to ask why nobody figured that out earlier.
(and we discussed the freeze and release dates long enough already, so I don't 
feel like repeating this now).

> > The initial version of the win32 related macro used a directory/pattern
> > based search for icons and selected the really used icons inside the
> > macro to be platform independent. See
> > http://websvn.kde.org/?view=rev&revision=720773 for this version
> >
> > I don't know why this was removed :-(
> > Would the following form would be usable by mac os too ?  If so there
> > could only be one macros for win32 and mac platform and the magics are
> > done inside the macr.
> >
> > KDE4_ADD_APP_ICON(<target> <icon-path-pattern> <source-variable>)
> If nobody objects, we'll rename our win32 macro to KDE4_ADD_APP_ICON()
> tomorrow.

If nobody from the release team objects, I'm ok with the change.

But don't simply rename it, this may simply break existing cmake files without 
useful error message.

Instead add:

  message(FATAL_ERROR "KDE4_ADD_WIN32_APP_ICON() is deprecated, 
                   use KDE4_ADD_APP_ICON() instead")


or use SEND_ERROR or FATAL_ERROR instead of STATUS for the message.

If it's too late for removing the macro, then add the new one and change the 
old one:

  message(STATUS "KDE4_ADD_WIN32_APP_ICON() is deprecated, 
                   use KDE4_ADD_APP_ICON() instead")


More information about the kde-core-devel mailing list