summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-02-23 17:05:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-23 23:46:01 +0100
commitbd5096d012327d4acb44449464cb00c488450cc5 (patch)
treeb0a7efa25a31cb81b0ea75b5afb5c1831bcaf350 /src
parent3d763dc83adce6fc270c17933fd66ae5c539517c (diff)
Add the QtMain windows library to the CMake files.
Change-Id: Iff8b9bdd4b069721103e1cd5854e56b6116d7549 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 4b5ac73bce..4873391f52 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -20,3 +20,26 @@ list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
!!IF !isEmpty(QT_LIBINFIX)
set(QT_LIBINFIX \"$${QT_LIBINFIX}\")
!!ENDIF
+
+!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
+set(Qt5Core_QTMAIN_LIBRARIES Qt5::WinMain)
+
+if (NOT _Qt5WinMain_target)
+ set(_Qt5WinMain_target 1)
+ add_library(Qt5::WinMain STATIC IMPORTED)
+endif()
+
+!!IF !isEmpty(debug_type)
+set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
+set_target_properties(Qt5::WinMain PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${_qt5_install_prefix}/$$CMAKE_LIB_DIR/$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}"
+)
+!!ENDIF
+
+!!IF !isEmpty(release_type)
+set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+set_target_properties(Qt5::WinMain PROPERTIES
+ IMPORTED_LOCATION_RELEASE \"${_qt5_install_prefix}/$$CMAKE_LIB_DIR/$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\"
+)
+!!ENDIF
+!!ENDIF