Build with -Wl,-subsystem,windows on Windows, to avoid console window.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4575 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 159de72..cda85ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -309,6 +309,9 @@
if(WIN32)
add_subdirectory(win)
+ if(CMAKE_C_COMPILER_ID STREQUAL GNU)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows")
+ endif(CMAKE_C_COMPILER_ID STREQUAL GNU)
else()
# No interest in building x related parts on Apple
if(NOT APPLE)