path: root/mkspecs/features/configure.prf
diff options
authorMaurice Kalinowski <>2013-11-05 20:36:01 +0100
committerThe Qt Project <>2013-11-14 18:53:48 +0100
commit88609e6da4159174178395e28ed81badd15baa03 (patch)
tree87d1e5bd8399540b876effc6f89761bd8d8279c7 /mkspecs/features/configure.prf
parentc5eba649b6540c6f5f154d0889c4aa0f88964e80 (diff)
Make console a no-op for WinRT
Compared to other platforms there is no concept of a console application in WinRT. Hence all applications need to be UI applications and use winmain. Furthermore winmain takes care of launch arguments to be properly converted to arguments passed to user's main(). There is a chicken and egg problem with config.tests as compilation needs to have an existing entry point which is not available at configure time. Hence hardcode the entry point to main for configuring to WinRT. Those tests are pure compile tests, so the logic of the test does not change. Change-Id: I4d3186691a8440845c24b2529cc9646e86dfd8da Reviewed-by: Oswald Buddenhagen <>
Diffstat (limited to 'mkspecs/features/configure.prf')
1 files changed, 6 insertions, 0 deletions
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index 39144e7216..fe41c541a2 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -53,6 +53,12 @@ defineTest(qtCompileTest) {
# Disable qmake features which are typically counterproductive for tests
qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
+ # On WinRT we need to change the entry point as we cannot create windows
+ # applications
+ winrt {
+ qmake_configs += " \"QMAKE_LFLAGS+=/ENTRY:main\""
+ }
# Clean up after previous run
exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")