[CMake] Building Cocoa applications with CMake
Mattias Holm
mattias.holm at contra.nu
Fri May 16 16:00:08 EDT 2008
Hi,
You need to add the resources to the executable and set the
MACOSX_PACKAGE_LOCATION property for them. I think that this will only
work with CMake 2.6.
I do something like this, nicked the lines from my project:
file(GLOB ORBIT_RES_TEX "textures/*.tga")
set_source_files_properties(${ORBIT_RES_TEX}
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources/textures)
add_executable(openorbit MACOSX_BUNDLE
${openorbit_SRC}
${ORBIT_RES_TEX})
Hope that helps.
/Mattias
>I?m a Cocoa developer, and I?m looking at CMake to use for building
>my applications. What I?ve seen so far is great, but the biggest
>problem I have encountered is that I can?t see how I should set up my
>resource files (images, nibs) etc. to be copied into the resulting app
>bundle. As far as I can tell there seems to be some kind of hardcoded
>system for moving the Info.plist in, so I can?t tell how to set up my
>stuff. Is there a command specifically for adding resource files, or
>alternatively a command for copying files/directories?
>Perhaps there is no support for this Cocoa is not cross-platform, but
>I?d just like to be sure before I start trying to set up my own
>solution.
More information about the CMake
mailing list