[CMake] problem with Visual Studio 2010 and additional link flags

Rolf Eike Beer eike at sf-mail.de
Mon Mar 7 01:14:11 EST 2011


> In my solution I have several samples, some of which are windows based 
> while other are console based.
> So I need to be able to change the link flag /SUBSYSTEM:CONSOLE (or 
> /SUBSYSTEM:WINDOWS) depending on the executable I'm building

> Am I missing something or is it a bug in the VS2010 generator ? (once 
> again, it was working with 2008)

You are missing the WIN32 argument to ADD_EXECUTABLE().

Eike


More information about the CMake mailing list