summarylogtreecommitdiffstats
path: root/0015-Rename-qtmain-to-qt5main.patch
blob: 10faeb3add33d3b37bee828f467cb80c9defff9b (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 d61af2077d70356fc0f69aeb27e82bed66f8d52e 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 5208d22bd6..1a058b787f 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -84,7 +84,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 0e71fd0015..0e8d41c685 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -325,14 +325,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.26.0