In QMake:
CONFIG += console
How do I get the same effect in CMake?
(specs: Qt 5.0.2, CMake 2.8.10)
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With