File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,14 @@ ELSE ( BUILD_SWV2_OSX_APP )
141141 )
142142ENDIF ( BUILD_SWV2_OSX_APP )
143143
144+ IF (WIN32 ) # Check if we are on Windows
145+ if (MSVC ) # Check if we are using the Visual Studio compiler
146+ set_target_properties (ShapeWorksView2 PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /ENTRY:\" mainCRTStartup\" " )
147+ else ()
148+ message (SEND_ERROR "You are using an unsupported Windows compiler! (Not MSVC)" )
149+ endif ()
150+ ENDIF ()
151+
144152
145153TARGET_LINK_LIBRARIES ( ShapeWorksView2
146154 ${QT_LIBRARIES}
@@ -149,7 +157,11 @@ TARGET_LINK_LIBRARIES( ShapeWorksView2
149157 ITKParticleSystem tinyxml
150158 )
151159
152-
160+ if (WIN32 )
161+ if (MSVC )
162+ set_target_properties (ShapeWorksView2 PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS" )
163+ endif ()
164+ endif ()
153165
154166# INSTALLATION AND PACKAGING
155167SET (plugin_dest_dir bin)
Original file line number Diff line number Diff line change @@ -95,9 +95,10 @@ int main( int argc, char** argv )
9595{
9696#ifdef WIN32
9797 ::SetErrorMode ( 0 );
98+ #ifdef _DEBUG
9899 RedirectIOToConsole2 ();
99100#endif
100-
101+ # endif
101102 try {
102103
103104#ifdef WIN32
You can’t perform that action at this time.
0 commit comments