Creating Mac OS X Packages with CMake

One of the newer features that we have added to CMake is the ability to generate visually appealing DragNDrop packages for Mac OS X. In doing so, we have refined our layout script and now wish to share our work so that other projects can easily generate DragNDrop packages.

Creating Mac OS X Packages with CMake

ParaView displays an example DragNDrop package generated with CMake.

Generating these packages entails specifying a custom background image and AppleScript to CPack. While the new ability allows each project to have nearly full control over the process and the layout of a package, it does require knowledge of AppleScript and the techniques used to create a package.
Below, you can find the AppleScript that CMake uses to package itself. This AppleScript is also available on GitLab, as is the background image.

The AppleScript can easily be modified and integrated by other projects. The only major change required is to edit line 42, which explicitly specifies the name of the package.

In preparation for the 5.2 release, the ParaView team integrated the above background image and AppleScript into the ParaView Superbuild to automatically create more visually appealing Mac packages. Special thanks goes to Sandia National Laboratories, which funded this effort.

We would also like to acknowledge Adam Strzelecki, who made the addition of the ability to CMake possible, as he designed the background image and the initial implementation.

CMake at SC16

In November, I will attend The International Conference for High Performance Computing, Networking, Storage and Analysis (SC16) along with other members of the CMake development team. I hope you will stop by the Kitware booth (#3437) to learn more about creating Mac OS X packages with CMake. Be sure to also ask us about the many open-source solutions we offer that leverage CMake, such as ParaView Catalyst, which ran on over one million cores earlier this year. We have posted our conference activities on our event listing, so take advantage of the opportunity to talk to us!

One Response to Creating Mac OS X Packages with CMake

  1. Marcus D. Hanwell says:

    This looks great, I hope we can start using this for more projects soon!

Questions or comments are always welcome!