Link MinGW binaries with -mwindows

mingw-w64 requires this when linking gui applications.
This commit is contained in:
dhewg 2011-12-20 01:22:51 +01:00 committed by Daniel Gibson
parent c476c0b168
commit 980937db1a

View file

@ -179,7 +179,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(ldflags ${ldflags} "-m32")
endif()
if (NOT MINGW)
if (MINGW)
set(ldflags ${ldflags} "-mwindows")
else()
set(sys_libs ${sys_libs} pthread)
endif()