[CMake] BundleUtilities

David Cole david.cole at kitware.com
Wed Nov 17 05:36:12 EST 2010


On Tue, Nov 16, 2010 at 10:15 PM, David Doria <daviddoria at gmail.com> wrote:
> Is the goal simply to copy
> ...VTK/bin/libvtkHybrid.a
> into the package?
>
> I tried this:
> INSTALL(CODE "\${VTK_DIR}/bin/libvtkHybrid.a")
>
> But I get:
>
> Parse error.  Expected a command name, got unquoted argument with text
> "${VTK_DIR}/bin/libvtkHybrid.a".
>
> I made a home for this here:
> http://www.vtk.org/Wiki/CMake/CPack/BundleUtilities/Examples/Linux/VTK
>
> if anyone has a better suggestion.
>
> David
>


The original goal of BundleUtilities was simple:
- to create a stand-alone bundle app on the Mac that was *entirely
self-contained* except for its references to
standard/available-on-every-Mac system libraries

Apps like this have the very nice property of being able to be copied
to any Mac by a simple file copy operation, and then you can just run
it on the other computer. No other installation necessary.

Perfect for people wanting to produce a Mac-like Mac application and
deliever it in a simple drag-n-drop installation package.

Now, BundleUtilities is cross-platform in this respect: it helps you
copy (possibly 3rd party) non-system libraries into your app (or the
directory that your app lives in) as an INSTALL(CODE step by using
native system tools to analyze your executables and their
prerequisites. And it does so in such a way that you don't have to
write all the INSTALL(FILES code yourself for 3rd party stuff in your
CMakeLists files.

Hopefully this explains the intent a little bit, and once you get into
understanding it better, explains why it is the way it is. We are
trying to make it work on Mac, Linux and Windows to make dependence on
3rd party libraries a little less onerous than it has been in the
past... There are still, even after a few iterations, some rough edges
here and there. Let us know how you progress.


HTH,
David C.


More information about the CMake mailing list