[cmake-developers] Making GUI applications by default

Eric Noulard eric.noulard at gmail.com
Fri Feb 17 04:03:32 EST 2012


2012/2/17 Stephen Kelly <steveire at gmail.com>:
>
> Hi there,
>
> Also in this thread one of the discussion topics was making CMake default to
> creating Gui-ready executables. That is, setting the WIN32_EXECUTABLE or
> MACOSX_BUNDLE property on the executable target.
>
> http://thread.gmane.org/gmane.comp.kde.devel.buildsystem/6961/focus=7005
>
> By default CMake does not set those properties, which is actually uncommon.
> Generally in KDE at least, only unit tests and some small utilities are non-
> gui executables.
>
> We'd like to be able to specify with a defaultProperty something like
>
> set(CMAKE_CREATE_GUI_EXECUTABLES ON)

You probably mean:

set_property(GLOBAL PROPERTY CMAKE_CREATE_GUI_EXECUTABLES ON)

> which would set those target properties to True on the Windows and Mac
> platforms by default. For unit tests, we could then disable it again.
>
> Thoughts/comments?

I have [at least] one project which build on Windows where some
applications (not test)
are not GUI apps. In fact those applications are seldom launched by
the user because
they are "forked" by some GUI apps.

If this was set by default would my apps still be working as expected?
or shall I
put "NON-GUI" properties on them?

If this was to be introduced I bet the default value of the property
should be OFF (or not SET)
for backward compatibility reason.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



More information about the cmake-developers mailing list