summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcursor.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-10-28 12:19:15 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-10-28 22:15:46 +0200
commit753199437943e2a89e458136fd11a5a43443b280 (patch)
tree53ded3aee4e97f84b4d50cf59c5784015964de9b /src/plugins/platforms/wasm/qwasmcursor.cpp
parent825505c4398983deb279b9fc2655ab5b6d44fb9a (diff)
CMake: Fix undefined reference to WinMain errors with MinGW
When linking against Qt with MinGW, libmingw32.a must come before libQt6EntryPointImplementation.a on the linker command line. Otherwise the linker cannot find the WinMain symbol that's defined in the EntryPointImplementation library. Under certain circumstances, mingw32 was linked after EntryPointImplementation. To reliably ensure the order of said libraries, we introduce the imported library EntryPointMinGW32. This target represents libmingw32.a and links against EntryPointImplementation. The link dependencies look like this: EntryPointPrivate -> EntryPointMinGW32 -> EntryPointImplementation The imported library EntryPointMinGW32 is defined in a separate .cmake file which is included by both src/entrypoint/CMakeLists.txt and Qt6EntryPointConfig.cmake. This is needed, because the consumer outside of Qt must access this imported library, and we cannot export imported libraries. Pick-to: 6.2 Fixes: QTBUG-93671 Change-Id: Ib3c5e80cbcc9c793d000e5ad637325bcf735a1ec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcursor.cpp')
0 files changed, 0 insertions, 0 deletions