QMake's CONFIG+=console in CMake
You don't do anything: for CMake, it's the default. If you want a Windows application, you'll need to add the WIN32
options to the call to add_executable
:
add_executable(<name> [WIN32] [MACOSX_BUNDLE]
[EXCLUDE_FROM_ALL]
source1 source2 ... sourceN)
This will set the linker to look for WinMain
instead of main
as you'd expect for a Windows GUI app, by setting the CMake internal WIN32_EXECUTABLE
.