mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
Hide console window on Windows using a workaround described here
http://public.kitware.com/Bug/view.php?id=14326 p4#: 22191
This commit is contained in:
parent
627211685d
commit
b31953eb4c
@ -191,7 +191,19 @@ source_group( "UserInterface" FILES ${USER_INTERFACE_FILES} )
|
||||
source_group( "SocketInterface" FILES ${SOCKET_INTERFACE_FILES} )
|
||||
|
||||
|
||||
add_executable(ResInsight
|
||||
# Default behaviour for a Qt application is a console application, resulting in a console window always being launced at startup
|
||||
# The following statement is used to control this behaviour
|
||||
# set_target_properties( MY_TARGET PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
|
||||
# This setting i not honored by Cmake - http://public.kitware.com/Bug/view.php?id=14326
|
||||
# We use the following workaround described in the bug report
|
||||
# ADD_EXECUTABLE(${TARGET_NAME} WIN32 ${SRC})
|
||||
# See CMake symbol WIN32_EXECUTABLE for details
|
||||
|
||||
if (MSVC)
|
||||
set( EXE_FILES WIN32)
|
||||
endif()
|
||||
set( EXE_FILES
|
||||
${EXE_FILES}
|
||||
${CPP_SOURCES}
|
||||
${MOC_FILES_CPP}
|
||||
${FORM_FILES_CPP}
|
||||
@ -201,6 +213,8 @@ add_executable(ResInsight
|
||||
${REFERENCED_CMAKE_FILES}
|
||||
)
|
||||
|
||||
add_executable( ResInsight ${EXE_FILES} )
|
||||
|
||||
|
||||
set( LINK_LIBRARIES
|
||||
cafPdmCvf
|
||||
@ -237,12 +251,6 @@ endif()
|
||||
|
||||
target_link_libraries( ResInsight ${LINK_LIBRARIES} ${EXTERNAL_LINK_LIBRARIES})
|
||||
|
||||
if(WIN32) # Check if we are on Windows
|
||||
if(MSVC) # Check if we are using the Visual Studio compiler
|
||||
set_target_properties(ResInsight PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
||||
endif()
|
||||
ENDIF()
|
||||
|
||||
# Copy Dlls
|
||||
if (MSVC)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user