[CMake] Mac bundled application with multiple executables.

Andreas Pakulat apaku at gmx.de
Sun Feb 9 17:56:48 EST 2014


Hi Bill,

On Sun, Feb 9, 2014 at 8:45 PM, Bill Somerville <bill at classdesign.com>wrote:

> Hi,
>
> noob here so firstly thanks for the great build tools!
>
> I'm struggling with shoehorning a Win32/Linux Qt GUI application into
> CMake for those targets and for OS-X.
>
> At the moment the Mac build is manually transformed into an OS-X app
> bundle. I am making some progress getting it to install (and package, for
> deployment) directly into a bundle format. Using MACOSX_BUNDLE on the main
> GUI executable target plus the required CMake variable declarations.
>
> What I am stuck with is how to include another executable in the app
> bundle. It is a console type program that is spawned from the GUI to do
> some background work. Although it can be run standalone from the console,
> its purpose is to be run by the GUI program. Therefore it belongs in the
> bundle.
>
> What incantation do I need to give CMake to get this executable into the
> bundle installation. It is built as a target by the same CMake script as
> the GUI executable.
>

This is how CMake itself is shipped on MacOSX (the bundle starts the qt gui
and contains the console gui as well as the various cli tools like cmake,
ctest etc. So you may want to look into CMake's own buildsystem files for
that, IIRC the cmake buildsystem wasn't that hard to understand and follow.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140209/2ef00b35/attachment.html>


More information about the CMake mailing list