[CMake] How do I tell cmake not to create a console window?
    Michael Wild 
    themiwi at gmail.com
       
    Mon May  3 02:39:33 EDT 2010
    
    
  
This won't do, it will produce a console-window when the executable is double-clicked. Windows is a PITA. Perhaps something like:
add_executable(simple WIN32 simple.c)
set_source_files_properties(simple.c PROPERTIES
  COMPILE_DEFINITIONS main=WinMain)
Michael
On 2. May, 2010, at 21:46 , Mike Jackson wrote:
> add_executable(simple simple.c)
> _________________________________________________________
> Mike Jackson                  mike.jackson at bluequartz.net
> BlueQuartz Software                    www.bluequartz.net
> Principal Software Engineer                  Dayton, Ohio
> 
> On Sun, May 2, 2010 at 10:20 AM, Mr Shore <shore.cloud at gmail.com> wrote:
>> I can achieve this by gcc :
>> 
>> gcc -mwindows -o simple simple.c
>> 
>> 
>> But only find this in cmake:
>> 
>> add_executable(simple WIN32 simple.c)
>> 
>> But it's not exactly the same as -mwindows,
>> 
>> this will require the entry point to be WinMain,
>> 
>> while gcc -mwindows doesn't require this.
>> 
>> How should I do it properly?
>> 
    
    
More information about the CMake
mailing list