summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2015-01-02 17:15:44 +0000
committerJosé Fonseca <jfonseca@vmware.com>2015-01-02 17:16:31 +0000
commit5ddb92ff090d40d2d5339e5f07b3a0ce10885462 (patch)
tree96b8730c37445aad207bff3b9df5e3d46c6c3ae6
parent99cac771d659064e41dce01129e9ed51ba19a4f5 (diff)
gui: Enable console on debug builds.
-rw-r--r--gui/CMakeLists.txt20
1 files changed, 10 insertions, 10 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index a7c97fd6..f69b7f37 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -72,12 +72,7 @@ include_directories(
${QT_INCLUDES}
)
-if (WIN32)
- # Use Windows subsystem (i.e., no console).
- set (qapitrace_SUBSYSTEM "WIN32")
-endif ()
-
-add_executable(qapitrace ${qapitrace_SUBSYSTEM} ${qapitrace_SRCS} ${qapitrace_UIS_H})
+add_executable(qapitrace ${qapitrace_SRCS} ${qapitrace_UIS_H})
target_link_libraries (qapitrace
image
@@ -93,10 +88,15 @@ if (APPLE)
# Recent builds of Qt no longer support i386 architecture
set_target_properties (qapitrace PROPERTIES OSX_ARCHITECTURES x86_64)
endif ()
-if (MSVC)
- # When the Windows subsystem is chosen by default MSVC expects WinMain()
- # entry point, but we rather use plain old main() everywhere.
- set_target_properties (qapitrace PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")
+
+if (WIN32 AND NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
+ # Use Windows subsystem (i.e., no console).
+ set_target_properties (qapitrace PROPERTIES CMAKE_WIN32_EXECUTABLE TRUE)
+ if (MSVC)
+ # When the Windows subsystem is chosen by default MSVC expects WinMain()
+ # entry point, but we rather use plain old main() everywhere.
+ set_target_properties (qapitrace PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")
+ endif ()
endif ()