[CMake] fixup_bundle, shared libs and Plugins

Crni Gorac cgorac at gmail.com
Wed Jan 12 12:00:47 EST 2011


On Tue, Jan 11, 2011 at 11:00 PM, David Cole <david.cole at kitware.com> wrote:
> On Tue, Jan 11, 2011 at 4:21 PM, Crni Gorac <cgorac at gmail.com> wrote:
>>
>>   [ ... ]
>>
>> 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
>

I was trying to make needed changes in BundleUtilities.cmake already,
but unfortunately to no avail.  I'd say it's one of these situations
when adding feature shouldn't be that hard for module maintainer, but
for mere mortals like myself it's rather tricky...

In any case, I think we should follow here what is already there for
BU_CHMOD_BUNDLE_ITEMS variable, so probably BU_STRIP_FILES variable
could be added for this, and then "if(BU_STRIP_FILES) ... endif()"
block could be put into fixup_bundle_item() function with some lines
inside that would check is given file executable or library, and
utilize CMAKE_STRIP to do the stripping.   However,
fixup_bundle_item() seems to be called on APPLE platform only, and
that is one issue here - I guess we need stripping for UNIX (and then
for Cygwin too).  Also, on the other side I really don't fully
understand how frameworks are handled, so I'm not sure would libraries
that are within frameworks get stripped here.  Thus as said above -
still seems like task for someone more knowledgeable...


More information about the CMake mailing list