[Cmake] subsystem:windows (MS Visual Studio 7 specific?)

Bill Hoffman bill . hoffman at kitware . com
Mon, 14 Jul 2003 10:54:10 -0400


You have to use the WIN32 option for ADD_EXECUTABLE:

ADD_EXECUTABLE - Add an executable to the project that uses the specified source files. 
Usage: ADD_EXECUTABLE(exename [WIN32] source1 source2 ... sourceN) This command adds an executable target to the current directory. The executable will be built from the list of source files specified. The second argument to this command can be WIN32 which indicates that the executable (when compiled on windows) is a windows app (using WinMain) not a console app (using main). 


At 10:46 AM 7/14/2003, Jan Woetzel wrote:

>Hi,
>
>I am actually porting a Linux GUI application to MS Windows using
>cmake 1.6.7, Visual studio 7 (and wxWindows 2.4.1).
>
>I need to set /subsystem:windows for my project files (project properties->linker->system->SubSystem).
>[Just for information: Otherwise I get a linker error for _mainCRTStartup,  I think it's the main/WinMain issue. ]
>
>
>(1) Is it correct that /subsytem:windows is a linker flag which has to be added to CMAKE_EXE_LINKER_FLAGS ?
>I added /subsystem:windows by hand during the camake run, but the project properties didn't notice my change.
>
>(2) I noticed that  CMAKE_CREATE_WIN32_EXE is set to this in Platform/Windows-cl.cmake.
>I think it's not used later - is this the desired behavior?
>What is CMAKE_CREATE_WIN32_EXE for?
>
>
>Sorry for this dumb question, but my Visual studio experience is quite limited.
>
>Best regards,
>Jan.
>
>-- 
> Jan Woetzel
> Url   www.mip.informatik.uni-kiel.de/~jw
>
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at cmake . org
>http://www . cmake . org/mailman/listinfo/cmake