aboutsummarylogtreecommitdiffstats
path: root/0015-Rename-qtmain-to-qt5main.patch
blob: 449698a967a4d3d4f28c8d662b4f1c4b20dbc908 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
From 092e86f5dedf3173be832f868b60b1c306c42bfa Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:25:40 +0200
Subject: [PATCH 15/31] Rename qtmain to qt5main

Prevents conflict with mingw-w64-qt4 package
---
 mkspecs/common/g++-win32.conf      | 2 +-
 mkspecs/features/create_cmake.prf  | 8 ++++----
 mkspecs/features/win32/windows.prf | 4 ++--
 src/winmain/winmain.pro            | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index d852ccc2ad..11249c1470 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -82,7 +82,7 @@ QMAKE_LIBS_OPENGL       = -lglu32 -lopengl32 -lgdi32 -luser32
 QMAKE_LIBS_OPENGL_ES2   = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
 QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
 QMAKE_LIBS_COMPAT       = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqtmain
+QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqt5main
 
 QMAKE_IDL               = $${CROSS_COMPILE}widl
 QMAKE_LIB               = $${CROSS_COMPILE}ar -rc
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 24ed125f12..593161f362 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -329,14 +329,14 @@ mac {
     }
 
     mingw {
-        CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a
-        CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
+        CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
+        CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
 
         CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
         CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
     } else {
-        CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib
-        CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
+        CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib
+        CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib
 
         CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
         CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index 272170d428..17f3ef9c2d 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -5,8 +5,8 @@ contains(TEMPLATE, ".*app") {
     mingw:DEFINES += QT_NEEDS_QMAIN
 
     qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
-        isEqual(entryLib, -lqtmain) {
-            lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
+        isEqual(entryLib, -lqt5main) {
+            lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qt5main$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
             PRE_TARGETDEPS += $$lib
             QMAKE_LIBS += $$lib
         } else {
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index 1f54c846ec..162e7a4b1b 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -2,7 +2,7 @@
 !win32:error("$$_FILE_ is intended only for Windows!")
 
 TEMPLATE = lib
-TARGET = qtmain
+TARGET = qt5main
 DESTDIR = $$QT.core.libs
 
 CONFIG += static
-- 
2.29.2