[CMake] cpack bundle generator qq
Timothy M. Shead
tshead at sandia.gov
Fri Jan 16 12:32:34 EST 2009
David Cole wrote:
> What Clinton wants, though, is the ability to just put his make install
> tree into the .dmg, not put it inside another bundle. His make install
> tree contains a bundle already.
Ahhh ... I see the distinction now. Good point. If you had the
hypothetical "dmg" generator:
* You could install executables generated with MACOSX_BUNDLE to "/", and
they will Just Work.
* You could put additional top-level files (such as READMEs) in the dmg
by installing them to "/". This is only doable in the current bundle
generator by installing files to "../..", and I don't know if that is
actually supported by CMake or not :) The /Applications symlink would
still have to be created by the generator, I think.
* You could create bundles of arbitrary complexity (my use case), by
using INSTALL() commands that create the bundle hierarchy directly. So
INSTALL(TARGETS foo DESTINATION /foo.app/Contents/MacOS/foo)
INSTALL(TARGETS a b DESTINATION /foo.app/Contents/Resources/bin)
INSTALL(FILES dependencies DESTINATION /foo.app/Contents/Resources/lib)
... and so on ...
I think the major drawback to this approach is that you end-up with one
set of INSTALL() paths for bundles, and a different set for other
platforms. Worse, you have to understand bundle internals to put
external dependencies where they can be used by individual bundles. For
me, this is a show-stopper because not one of my projects is so simple
that it doesn't have any third-party dependencies. The goal with the
bundle generator is to abstract away platform differences so that one
set of INSTALL() paths works everywhere.
Cheers,
Tim
--
Timothy M. Shead
Data Analysis & Visualization (1424)
Sandia National Laboratories
505-284-0139
More information about the CMake
mailing list