Icons for Mac OS/X bundles / kde4_add_app_icon

Jeremy Lainé jeremy.laine at m4x.org
Wed Oct 14 10:53:05 CEST 2009


Hello,

I have recently started trying to get KDE in macports into shape and  
one the things I noticed is that applications built as bundles (*.app)  
for OS/X didn't have any icons.. except for Amarok. So I started  
probing around and came across a comment in Amarok's CMakeList.txt  
stating that the kde4_add_app_icon macro was not working correctly.

Taking kteatime as an example, what is happening is that while the  
bundle is getting installed to:

/Applications/MacPorts/KDE4/kteatime.app

.. the icon is ending up in:

/opt/local/bin/kteatime.app/Contents/Resources/kteatime.icns

Next I looked at KDE4Macros.cmake and found:

---------------
#            this doesn't seem to work for me - Use manual "install"  
instead
# TODO: test again with cmake 2.6 ?
#           SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/$ 
{target}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)

install(FILES ${_outfilename}.icns DESTINATION ${BIN_INSTALL_DIR}/$ 
{target}.app/Contents/Resources/)
---------------

Well sure enough if I comment out the "install" line and restore the  
"set_source_files_properties", things work just fine. So my question  
is : what is the history behind the comment, what was failing?

Cheers,
Jeremy 


More information about the Kde-buildsystem mailing list