[PATCH] Mac OS X application icon support

Benjamin Reed rangerrick at gmail.com
Mon Feb 11 06:40:20 GMT 2008


On Dec 30, 2007 6:30 AM, Ralf Habacker <ralf.habacker at freenet.de> wrote:

> >> Would appreciate the patch in KDE 4.0, otherwise, KDE apps will look sad
> >> in the OS X dock.
> >>
> >>
> > Go ahead.
> >
> >
> It is checked in.

I was just doing a kde trunk build, and it appears there's something
wrong with the app icon stuff (at least, with cmake 2.4.8):

---(snip!)---
[ 75%] Built target kalgebra
[100%] Built target calgebra
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing /Users/ranger/cvs/kdemac/kdeedu/root/opt/kde4/lib/libanalitza.dylib
-- Installing /Users/ranger/cvs/kdemac/kdeedu/root/opt/kde4/bin/kalgebra.app
-- Installing /Users/ranger/cvs/kdemac/kdeedu/root/opt/kde4/bin/kalgebra.app/Contents
-- Installing /Users/ranger/cvs/kdemac/kdeedu/root/opt/kde4/bin/kalgebra.app/Contents/Info.plist
-- Installing /Users/ranger/cvs/kdemac/kdeedu/root/opt/kde4/bin/kalgebra.app/Contents/MacOS
-- Installing /Users/ranger/cvs/kdemac/kdeedu/root/opt/kde4/bin/kalgebra.app/Contents/MacOS/kalgebra
-- Installing /Users/ranger/cvs/kdemac/kdeedu/root/opt/kde4/share/applications/kde4/kalgebra.desktop
CMake Error: Error in cmake code at
/Users/ranger/rcs/kdemac/compile.build/kdeedu/kalgebra/src/cmake_install.cmake:32:
FILE INSTALL cannot find file
"/Users/ranger/rcs/kdemac/compile.build/kdeedu/kalgebra/src/kalgebra.icns"
to install.
Current CMake stack:
[2]	/Users/ranger/rcs/kdemac/compile.build/kdeedu/kalgebra/src/cmake_install.cmake
[1]	/Users/ranger/rcs/kdemac/compile.build/kdeedu/kalgebra/cmake_install.cmake
---(snip!)---

...the specification in the kalgebra CMakeLists.txt looks like this:

---(snip!)---
kde4_add_app_icon(kalgebra_SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-kalgebra.png")
---(snip!)---

...if I try to add this to KDE4Macros.cmake:

---(snip!)---
message(STATUS "Found icon ${_icon} (${_outfilename}.icns)")
# Append the icns file to the sources list so it will be a dependency to the
# main target
list(APPEND ${appsources} ${_outfilename}.icns)

foreach(as ${appsources})
  message(STATUS "as = ${as}")
endforeach(as)
---(snip!)---

...the cmake build says:

---(snip!)---
-- Found icon /Users/ranger/rcs/kdemac/source.build/kdeedu/kalgebra/src/../icons/hi128-app-kalgebra.png
(/Users/ranger/rcs/kdemac/compile.build/kdeedu/kalgebra/src/kalgebra.icns)
-- as = kalgebra_SRCS
---(snip!)---

Which, unless I'm misusing/misunderstanding foreach, it's giving me
the name of the list specified in CMakeLists.txt, not a list.

Any ideas what's going wrong?

-- 
Benjamin Reed a.k.a. Ranger Rick
Fink, KDE, and Mac OS X development
http://www.racoonfink.com/



More information about the kde-core-devel mailing list