[CMake] OSX Bundling

Michael Jackson mike.jackson at bluequartz.net
Sat May 7 10:30:34 EDT 2011

On May 7, 2011, at 10:07 AM, jtwadsworth wrote:

> Michael Jackson wrote:
>> If it is a true OS X native app then you will want to look at
>> "BundleUtilities" in CMake to build the app bundle. If it is an X11
>> wrapper that you want then there is an x11 packaging target that you
>> can use. Both are covered in the documentation.
> Which would it be considered?  It is definitely not a native OSX app as it
> is compiled across all Unixes.  I just need it to run from an .app with its
> own window rather than in terminal.
> jtw
> --

cpack --help shows this as a possibility:

OSXX11                      = Mac OSX X11 bundle

So in your CPack code in your CMakeLists.txt file you would need to set something like this:

if (APPLE)



I know there is a bunch of other setup stuff that needs to be done. Take a look at <href="http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#OSXX11_.28OSX_only.29"> for more details on what you want to do.

Mike Jackson

More information about the CMake mailing list