[CMake] about generated Windows executable

Rolf Eike Beer eike at sf-mail.de
Wed Jan 18 03:35:45 EST 2012


> Hi,
> first, i would like to thank you for this great tool...
>
> i'm using cmake on macos 10.7.2, for my project cmake create osx bundle,
> windows executable, and very soon linux executable.
> the windows executable is generated thanks to a cross mingw compiler.
> the problem i'm facing is when i launch my program on windows, a dos
> shell like appears...
> is there's a way to prevent that ?

add_executable(myapp WIN32 ...)

That WIN32 flag is ignored on all other platforms, so no need for an if()
here.

Eike


More information about the CMake mailing list