summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/entrypoint.prf11
-rw-r--r--mkspecs/features/qt.prf4
-rw-r--r--mkspecs/features/qt_module_pris.prf1
3 files changed, 6 insertions, 10 deletions
diff --git a/mkspecs/features/entrypoint.prf b/mkspecs/features/entrypoint.prf
index 48bb378034..fbe637326e 100644
--- a/mkspecs/features/entrypoint.prf
+++ b/mkspecs/features/entrypoint.prf
@@ -1,11 +1,2 @@
-qt:!console:contains(TEMPLATE, ".*app") {
- # This library needs to come before the entry-point library in the
- # linker line, so that the static linker will pick up the WinMain
- # symbol from the entry-point library. Unfortunately qmake and the
- # module system doesn't allow specifying linker flags or dependencies
- # as part of the module that end up _before_ the library itself, so
- # we have to work around it by declaring the dependency here.
- mingw: LIBS += -lmingw32
-
+qt:!console:contains(TEMPLATE, ".*app"): \
QT_PRIVATE += entrypoint_private
-}
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index c1691a7894..55a51293ac 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -180,6 +180,7 @@ for(ever) {
MODULE_NAME = $$eval(QT.$${QTLIB}.name)
MODULE_MODULE = $$eval(QT.$${QTLIB}.module)
MODULE_INCLUDES = $$eval(QT.$${QTLIB}.includes)
+ MODULE_LDFLAGS = $$eval(QT.$${QTLIB}.ldflags)
MODULE_LIBS = $$eval(QT.$${QTLIB}.libs)
MODULE_FRAMEWORKS = $$eval(QT.$${QTLIB}.frameworks)
MODULE_USES = $$eval(QT.$${QTLIB}.uses)
@@ -200,6 +201,9 @@ for(ever) {
MODULE_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
+ # Add linker flags before lib
+ LIBS$$var_sfx += $$MODULE_LDFLAGS
+
# Frameworks shouldn't need include paths, but much code does not use
# module-qualified #includes, so by default we add paths which point
# directly into the frameworks. Private modules have somewhat convoluted
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index 9b632a864f..7a6cc56754 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -135,6 +135,7 @@ defineReplace(qtExportLibsForModule) {
"" \
"QT.$${MODULE_ID}.name = $$TARGET" \
"QT.$${MODULE_ID}.module = $$module_module" \
+ "QT.$${MODULE_ID}.ldflags = $$MODULE_LDFLAGS" \
"QT.$${MODULE_ID}.libs = $$module_libs" \
$$module_master \
"QT.$${MODULE_ID}.includes = $$MODULE_INCLUDES" \