I\'m making an application in Qt Creator, with cmake and MinGW as compiler. I\'ve seen this question being answered for other people, but they used regular Qt projects with .pro
You will most likely have a line such as the following in your CMakeLists.txt:
ADD_EXECUTABLE(exename ....)
where of course the dots are further arguments. Change this to:
ADD_EXECUTABLE(exename [WIN32] ...)
to specify that it's a Win32 application and not a console application.
Or, as can be found on the CMAKE website "If WIN32
is given the property WIN32_EXECUTABLE
will be set on the target created." And when WIN32_EXECUTABLE is set it will "Build an executable with a WinMain entry point on windows."