cmake: make tools target the console subsystem on Windows
previously on Windows the stdout stuff was only printed on MinTTY console or SSH shell,
this change makes the tools to target the console subsystem so they also print stdout
on cmd console.
this also makes the tool spawning a cmd console windows when not started from a console,
allowing people to monitor what is printed.
this is done by adding a console_app() cmake macro that enables the -mconsole linker flag.
For exhaustivity an extraneous window_app() macro is done too that enables the -mwindows
flag. The -mwindows looks to be implicit, but making this macro explicit and using it
keeps the CMakeLists.txt file self documenting which exe has to be compiled with -mconsole,
which one has to be compiled with -mwindows, and which one has to be compiled with both.
this is a way to check if an exe targets only the windows subsystem:
$ objdump -p netradiant.exe | egrep '^Subsystem'
Subsystem
00000002 (Windows GUI)
this is a way to check if an exe targets the console subsystem:
$ objdump -p q3map2.exe | egrep '^Subsystem'
Subsystem
00000003 (Windows CUI)
note that this one targets both console and windows subsystem, only console is reported:
$ objdump -p q2map.exe | egrep '^Subsystem'
Subsystem
00000003 (Windows CUI)