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

kevin martinet kevin at ityrant.net
Mon Mar 7 00:42:47 EST 2011


Hi

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

To do so, I'm using a call to
set_target_properties(Sample PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS") 
(for a windows sample)

This used to work perfectly with a Visual 2008 generator, but not with 
the Visual Studio 2010.
The new /SUBSYSTEM:xxx does not appear in the project link flags

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

Thanks
Kevin.


More information about the CMake mailing list