diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-05-26 08:34:11 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-05-27 21:44:39 +0200 |
commit | e7d12b876ab7d80b0eb983d6d5c90f64bfafed02 (patch) | |
tree | 69c5d488c847e9f36fbc37a399f32ce5f4a4f048 /src | |
parent | ce2bc0e2d5b1d647db1e1726ecd434cc8a55accf (diff) |
Fix qmake builds of Windows applications against a CMake-built Qt
QMake's windows.prf expects the WinMain library to be named
'qtmain[d].lib' and not 'Qt6WinMain[d].lib'. We're renaming the
library to 'qtmain[d].lib' in the CMake build now to avoid adjusting
the qmake build of Qt.
Also, we have to add the private library shell32.lib to WinMain to
make it appear in qtmain.prl and having it linked to Windows GUI
applications.
Fixes: QTBUG-84425
Change-Id: Ia94090b89e037b17ebfded359b293c8586371d59
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/winmain/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/winmain/CMakeLists.txt b/src/winmain/CMakeLists.txt index fb48fec5a3..fb83894a9f 100644 --- a/src/winmain/CMakeLists.txt +++ b/src/winmain/CMakeLists.txt @@ -14,12 +14,15 @@ qt_add_module(WinMain $<TARGET_PROPERTY:Qt::Core,INTERFACE_INCLUDE_DIRECTORIES> ) +set_property(TARGET WinMain PROPERTY OUTPUT_NAME qtmain) + qt_extend_target(WinMain CONDITION WINRT SOURCES qtmain_winrt.cpp ) qt_extend_target(WinMain CONDITION NOT WINRT SOURCES qtmain_win.cpp + LIBRARIES shell32 ) qt_extend_target(WinMain CONDITION MINGW |