[cmake-developers] Making GUI applications by default

Eric Noulard eric.noulard at gmail.com
Mon Mar 5 09:57:24 EST 2012


2012/3/5 Stephen Kelly <steveire at gmail.com>:
> Clinton Stimpson wrote:
>
>>> I happened to read a little bit about CPack recently
>>>
>>> http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#Overview
>>>
>>> The recommendation is to not use MACOSX_BUNDLE when using cpack,
>>
>> I don't see that as a general recommendation for GUI applications on Mac
>> OS X.
>
> Yes, my statement was a little over-general.
>
>> Its only true if you use the Bundle generator, which does the
>> equivalent of the MACOSX_BUNDLE conversion at cpack time (not install
>> time).  I wouldn't base a general statement on a generator where one has a
>> broken "make install" just to make a cpack generator work.
>>
>> If you use any other cpack generator with a GUI application, you do use
>> MACOSX_BUNDLE.
>
> I imagined that users could set the value of CMAKE_MACOSX_BUNDLE to True by
> default, but False if ("${CPACK_GENERATOR}" STREQUAL "MACOSX_BUNDLE").
>
> Is that realistic? I don't really know much about cpack, bundles or Mac OSX
> in general.

Not really, you may decide run MacOSXBundle CPack generator outside
CMakeLists.txt
i.e. at CPack time and not at CMake time:

cpack -G OSXX11

I don't know much about this CPack generator but from my point of view
the generator
itself should check whether if the executable have been built properly
and warn/error out
with appropriate message if not.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org



More information about the cmake-developers mailing list