Index: modules/KDE4Macros.cmake
===================================================================
--- modules/KDE4Macros.cmake	(revision 622833)
+++ modules/KDE4Macros.cmake	(working copy)
@@ -617,9 +617,9 @@
    target_link_libraries(${_target_NAME} kdeinit_${_target_NAME})
 #   endif (WIN32)
 
-   if (WIN32)
+   if (WIN32 AND NOT ENABLE_CONSOLE)
       target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARIES})
-   endif (WIN32)
+   endif (WIN32 AND NOT ENABLE_CONSOLE)
 
 endmacro (KDE4_ADD_KDEINIT_EXECUTABLE)
 
@@ -637,9 +637,9 @@
    endif (APPLE)
 
    # for GUI apps, this disables the additional console under Windows
-   if (WIN32)
+   if (WIN32 AND NOT ENABLE_CONSOLE)
       set(_add_executable_param WIN32)
-   endif (WIN32)
+   endif (WIN32 AND NOT ENABLE_CONSOLE)
 
    if (_nogui)
       set(_type "NOGUI")
@@ -661,9 +661,9 @@
 
    kde4_handle_rpath_for_executable(${_target_NAME} ${_type})
 
-   if (WIN32)
+   if (WIN32 AND NOT ENABLE_CONSOLE)
       target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARIES})
-   endif (WIN32)
+   endif (WIN32 AND NOT ENABLE_CONSOLE)
 
 endmacro (KDE4_ADD_EXECUTABLE)
 
