[CMake] OS-X app bundle - executable name vs bundle name

James Turner james.turner at kdab.com
Wed Jan 29 10:12:55 EST 2014


Hi,

I’m experimenting with using Cmake’s bundle support on OS-X for a project. (Up until now I have assembled the bundle by hand using a separate script which also creates the DMG). I have the situation, that I need the executable name to be different to the bundle name. MACOSX_BUNDLE_BUNDLE_NAME lets met set the name that appears in the CFBundleName key of the Info.plist, but the generated bundle still has the name of the target.

I.e I want:

	add_target(foo MACOSX_BUNDLE …. sources )

	set_target_properties(foo PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME “Wonderful App”)

And end up with:

	./Wonderful App.app/Contents/MacOS/foo

Unfortunately it doesn’t work - any suggestions on ways to achieve this? (I’ve Googled and the only hits predate the addition of the MACOSX_BUNDLE_ target properties)

(Tested with Cmake 2.8.11)

One more thing, is there a standard way to install other components inside the bundle? I have seen some examples on the web which hardcode the bundle name as the destination path, which feels a bit ugly. (I’m thinking about helper applications and dylibs here, as well as the .icns file)

Kind regards,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5178 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140129/c45d2504/attachment-0001.bin>


More information about the CMake mailing list