From 980937db1a9449fe8f69d89c41d2af6f6f72b505 Mon Sep 17 00:00:00 2001 From: dhewg Date: Tue, 20 Dec 2011 01:22:51 +0100 Subject: [PATCH] Link MinGW binaries with -mwindows mingw-w64 requires this when linking gui applications. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c75222..3f8197d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()