From 7799da7179cece09ca7f1af49f7c5c2cc4bd7477 Mon Sep 17 00:00:00 2001 From: Deve Date: Mon, 30 Mar 2015 20:12:25 +0200 Subject: [PATCH] MinGW: Don't show console window in release mode. Removed unused cmake option. --- CMakeLists.txt | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05373fa68..b0e9f2894 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,9 +19,6 @@ option(USE_WIIUSE "Support for wiimote input devices" ON) option(USE_FRIBIDI "Support for right-to-left languages" ON) option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON) -if(UNIX OR MINGW) - option(USE_CPP2011 "Activate C++ 2011 mode (GCC only)" OFF) -endif() if(MSVC OR MINGW) # Normally hide the option to build wiiuse on VS, since it depends # on the installation of the Windows DDK (Driver Developer Kit), @@ -172,13 +169,6 @@ if (OPENMP_FOUND) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") endif() - -if(UNIX OR MINGW) -# if(USE_CPP2011) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x") -# endif() -endif() - # OpenGL find_package(OpenGL REQUIRED) include_directories(${OPENGL_INCLUDE_DIR}) @@ -198,12 +188,16 @@ if(UNIX AND NOT APPLE) endif() endif() - # Set some compiler options if(UNIX OR MINGW) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") endif() +if(MINGW AND CMAKE_BUILD_TYPE MATCHES Release) + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--subsystem,windows") +endif() + if(WIN32) # By default windows.h has macros defined for min and max that screw up everything add_definitions(-DNOMINMAX)