summarylogtreecommitdiffstats
path: root/0016-Rename-qtmain-to-qt5main.patch
blob: cfec875be259bd79356c942ce05c50ba804d55f9 (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
From c37572ff090abe65285eacaedf7e7022af92aae6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:25:40 +0200
Subject: [PATCH 16/34] Rename qtmain to qt5main

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

diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index 07e2b6a88e..5bfbcfdca6 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -86,7 +86,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 2ed708e085..e67917cc96 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -227,8 +227,8 @@ mac {
     CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
 
     mingw {
-        CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
-        CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
+        CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}.a
+        CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
 
         !isEmpty(CMAKE_STATIC_TYPE) {
             CMAKE_STATIC_WINDOWS_BUILD = "true"
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index ecb167bf18..7c9368c3b3 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -5,7 +5,7 @@ contains(TEMPLATE, ".*app") {
     mingw:DEFINES += QT_NEEDS_QMAIN
 
     qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
-        isEqual(entryLib, -lqtmain) {
+        isEqual(entryLib, -lqt5main): {
             !contains(QMAKE_DEFAULT_LIBDIRS, $$QT.core.libs): \
                 QMAKE_LIBS += -L$$QT.core.libs
             CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}d
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index 61e9f29d23..a1795bf265 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.20.1