[CMake] fixup_bundle, shared libs and Plugins

David Cole david.cole at kitware.com
Tue Jan 11 17:00:23 EST 2011


On Tue, Jan 11, 2011 at 4:21 PM, Crni Gorac <cgorac at gmail.com> wrote:

> On Tue, Jan 11, 2011 at 6:22 PM, David Cole <david.cole at kitware.com>
> wrote:
> > On Tue, Jan 11, 2011 at 12:08 PM, Michael Jackson
> > <mike.jackson at bluequartz.net> wrote:
> >>
> >> This is wonderful and I am making progress but I have a few more
> >> questions. Assume I am using CMake 2.8.3 (as it will become the
> >> requirement).
> >>
> >>  For external Dylibs and frameworks that my project depends on will the
> >> new way that bundle utilities work still copy the frameworks (like Qt
> >> frameworks) and external libraries (like HDF5, libTiff .. ) that are NOT
> >> part of my project? So my project builds its own couple of libraries
> (AIMLib
> >> & MXADataModel) but also depends on some external libraries (HDF5,
> libTiff,
> >> Expat, Boost). Do I need to have install rules or otherwise get those
> copied
> >> into the the bundle BEFORE calling fixup_bundle()?
> >
> > No -- if we did that, BundleUtilities would truly be nearly useless. :-)
> >
> > If a prerequisite is pulled in via dependency analysis, then fixup_bundle
> > will still copy it in (assuming it's not classified as a "system" library
> > ("system" == assumed to be pre-installed and available everywhere...))
> >
> > The change was made only for the "additional libraries" passed in as the
> > parameter to fixup_bundle, which primarily equates to plugins...
> >
> > The idea is: you know the additional libraries anyway because you're
> passing
> > them in, so you should install them in the bundle beforehand and pass in
> the
> > names just for prerequisite analysis and fixup. The additional libraries
> > will not show up in the prerequisites analysis because they are typically
> > only loaded dynamically at runtime. Hard links to non-system frameworks
> and
> > libraries will be copied in and fixed up.
>
> I hope you guys don't mind if I jump in and re-ask related question I
> posted couple days ago (I'm sure Michael will soon face the same
> problem, if he's building also for for Mac, so he may be interested
> too): Is it possible with all this BundleUtilities mechanism to have
> these prerequisite library/plugin files, that fixup_bundle() is
> copying in, stripped?  On Qt SDK for Mac, Qt libraries and plugins are
> not stripped, and thus generated package/installer gets rather
> large...
>
> Thanks.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


"Stripping" during fixup_bundle would be a good feature request for a future
CMake release. We could do it simply by adding a variable that controls
whether stripping gets done or not, and then setting that variable to OFF by
default so that it behaves the same as it does now unless you explicitly
enable it.

Does anybody have time to work up a patch to do this?


David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110111/6432a60e/attachment-0001.htm>


More information about the CMake mailing list