[CMake] cpack bundle generator qq

Clinton Stimpson clinton at elemtech.com
Fri Jan 16 14:12:55 EST 2009


Timothy M. Shead wrote:
> Mike Arthur wrote:
>> On Friday 16 January 2009 16:54:22 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.
>> I'd strongly argue that CMake already has too much duplication on 
>> this front. Either the MACOSX_BUNDLE property should be used for all 
>> CPack generators, none or removed completely and CPack used for 
>> generating bundles instead.
>>
>> It's exceptionally confusing for someone who comes to CMake having 
>> not used it for Mac packaging before to find three ways of doing it, 
>> all having slightly different features...
>>
>
> No argument here.  I am of the opinion that current MACOSX_BUNDLE 
> behavior is fatally-flawed - it is difficult to imagine distributing 
> any application that contains just an executable with no 
> documentation, data, or external dependencies, let-alone my use-case 
> for multiple executables.
>
> On the other hand, I know that if your application doesn't have the 
> bundle structure, weird things happen when you run it from your build 
> directory.
>
> Is it possible for CPack generator code to "know" that a file was 
> built with the MACOSX_BUNDLE property set, so that it could adjust its 
> behavior?
>

To add this capability to the Bundle generator, how about just checking 
if CPACK_BUNDLE_NAME is not set?  If its not set, then simply take the 
install tree, and add a /Applications link, maybe a few other options to 
make it fancy, and dmg-ify it.  Seems in that case it would be a very 
simple generator, as I really want my "make install" tree to work.  And 
in my case where I want a top level directory containing multiple 
bundles and files, I could just set the CPACK_PACKAGING_INSTALL_PREFIX 
to get the same behavior as the PackageMaker generator.

Though a "DragAndDrop" generator seems to be a better name for that kind 
of behavior than "Bundle" generator.

Clint



More information about the CMake mailing list