[CMake] BundleUtilities

Clinton Stimpson clinton at elemtech.com
Wed Nov 17 11:54:22 EST 2010


On Wednesday, November 17, 2010 07:32:45 am Michael Jackson wrote:
> I tool a little different approach in my own projects. I end up
> "configuring" a shell script that gets run at install time (OS X
> Only). Inside that shell script are all the copying to the
> CMAKE_INSTALL_PREFIX, ensuring destination directories inside the OS X
> App bundle are setup (Plugins, libs, Frameworks) and then finally
> calling the BundleUtilities to copy all the dependent libraries and
> plugins into the App bundle and "fixing" the install_name embedded in
> each library so that they point to libraries inside the bundle. For Qt
> projects I also make sure a blank qt.conf file and qtmenu.nib file are
> properly copied into the bundle.

BundleUtilities now takes care of the qtmenu.nib.

> 
>    There are some "dark" issues when it comes to plugins. The basic
> BundleUtilities will look for files that end with .dylib (on OS X) and
> copy those to the "lib" directory and frameworks into the Framework
> directory. The issue for me was when I had plugins with .dylib file
> extensions these would always be copied into the wrong directory. I
> had to make sure I used a set properties to set the file extension of
> my own plugins to .plugin so I had a guaranteed way to tell the
> difference between a support library that should go into "lib" and a
> plugin that should get copied into Plugins. One form of this can be
> found at
> <http://scm.bluequartz.net/support-libraries/cmp/blobs/master/OSX_Tools/Co
> mpleteBundle.cmake.in

That sounds like an issue that has been fixed already in BundleUtilties.

Clint


More information about the CMake mailing list