[CMake] OSX Bundle Generator for Cpack

Shead, Timothy tshead at sandia.gov
Fri Jun 6 13:08:38 EDT 2008


On 6/6/08 10:49 AM, "Benjamin Reed" <rangerrick at gmail.com> wrote:

> On Fri, Jun 6, 2008 at 12:42 PM, Shead, Timothy <tshead at sandia.gov> wrote:

>> I started the new generator because I needed more control over the final
>> output than current approaches provided.  In particular, I needed to skip
>> starting X11 for some projects (Qt-based) while retaining the ability to
>> setup a custom environment before the program starts (e.g. set
>> DYLD_LIBRARY_PATH).  I also needed to generate my own Info.plist.
>
> One thing I would recommend, DYLD_LIBRARY_PATH should be considered
> harmful except for very specific uses.  You're best off at least
> setting it as DYLD_FALLBACK_LIBRARY_PATH (which behaves more like
> you'd expect from LD_LIBRARY_PATH on other *NIXes) or, at least,
> having the option to do so.

Just to clarify, this is completely up-to the person doing the packaging,
the generator simply accepts the name of a script/binary to be run when the
bundle is opened.  The contents of the startup command are arbitrary.  In
fact, this where the generator needs the most improvement, to provide some
reasonable fallback-behavior in cases where an environment doesn't need to
be set-up.

FWIW, I'm using DYLD_LIBRARY_PATH because I want to ship a bundle containing
known-good / known-compatible versions of its dependencies.  With
DYLD_FALLBACK_LIBRARY_PATH, the application would prefer to use system
libraries when they're available.  There are pros and cons to either
approach, of-course.

Many thanks!
Tim

--
Timothy M. Shead
Scalable Analytics & Visualization (1424)
Sandia National Laboratories
505-284-0139





More information about the CMake mailing list