[cmake-developers] Making GUI applications by default

Stephen Kelly steveire at gmail.com
Fri Feb 17 09:27:29 EST 2012


Brad King wrote:

> On 2/17/2012 5:44 AM, Stephen Kelly wrote:
>> I meant 'default' in the sense of
>> cmTarget::SetPropertyDefault, in the same way that set(CMAKE_AUTOMOC ON)
>> sets the AUTOMOC property to true by default for all targets that follow.
> [snip]
>> default value of the property *if* set(CMAKE_CREATE_GUI_EXECUTABLES) is
>> ON.
> 
> Instead of a special behavior for WIN32_EXECUTABLE and MACOSX_BUNDLE
> property defaults, consider creating a new property that generalizes
> the concept, such as "GUI_EXECUTABLE".  Teach the code and update the
> documentation to specify that the property implies WIN32_EXECUTABLE
> and MACOSX_BUNDLE on the respective platforms.
> 
> Then add SetPropertyDefault in the initialization of EXECUTABLE targets
> so that
> 
>    set(CMAKE_GUI_EXECUTABLE 1)
> 
> will change the default for new executable targets in scope of the
> variable.

Yes, I had the same idea last night after emailing.

I can implement that.

Thanks,

Steve.





More information about the cmake-developers mailing list