[cmake-developers] Fixing up arbitrary Mac OS bundles

Mike Gelfand mikedld at mikedld.com
Tue Sep 13 04:10:54 EDT 2016


Hello,

I'm trying to fixup an embedded bundle which is a QuickLook plugin. The
bundle has .qtgenerator extension and should be located in <app
name>.app/Contents/Library/QuickLook/<plugin name>.qtgenerator. This
doesn't work right away. I've tried:

1. fixup_bundle("<app name>.app/Contents/Library/QuickLook/<plugin
name>.qtgenerator" "" "")

This fails with warning "*NOT* handled - directory but not .app case..."
and error "fixup_bundle: not a valid bundle"

2. fixup_bundle("<app name>.app/Contents/Library/QuickLook/<plugin
name>.qtgenerator/Contents/MacOS/<plugin name>" "" "")

This fails with warning "*NOT* handled - not .app dir, not executable
file..." and error "fixup_bundle: not a valid bundle"

Note that `file` reports "Mach-O 64-bit bundle x86_64" for bundle
executable file.

3. change bundle .qlgenerator suffix to .app (temporarily for fixup), then
fixup_bundle("<app name>.app/Contents/Library/QuickLook/<plugin name>.app"
"" "")

This succeeds with warnings "unexpected reference to '<library
name>.dylib'" for each library which needs to be copied into the bundle,
but no libraries are actually copied and no changes to bundle executable
are made.

4. adding bundle to libs parameter when fixing up parent bundle (even
though app executable doesn't in fact depend on the bundle),
fixup_bundle("<app name>.app" "<app
name>.app/Contents/Library/QuickLook/<plugin
name>.qtgenerator/Contents/MacOS/<plugin name>" "")

This succeeds without warnings, but no changes to bundle executable are made.


So the question is, is it at all possible to do what I want to do with
current CMake version? If not, maybe someone's working on this? If not, do
you have any suggestions on how one would go about implementing support
for this (I might give it a try if/when time permits)?

Regards,
Mike



More information about the cmake-developers mailing list