From 319fd4ea9ae89874671296c33880805c401844c9 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 12 Jun 2019 13:09:13 +0200 Subject: Make WinMain linkage compatible with Qt 5 In Qt 5, the Qt5Core target was extended by Qt5CoreConfigExtras.cmake to have a generator expression as interface linkage that would conditionally link WinMain. This patch implements the same through regular interface linkage right in corelib. Since the linkage happens through a generator expression, our dependency generator does not see this as a dependency. Therefore we add this as an unconditional package dependency for corelib, on Windows. In theory this could be done also in winmain's CMakeLists.txt, as targets can be extended outside of their directory. However this adds a directory id (WinMain:@<023423>) to the linkage, which mysteriously is not removed on the exported core target. Change-Id: If2abb9ba790f51274f582c9ec28c13d968b84302 Reviewed-by: Alexandru Croitor Reviewed-by: Qt CMake Build Bot --- src/winmain/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/winmain') diff --git a/src/winmain/CMakeLists.txt b/src/winmain/CMakeLists.txt index 10c3252f43..1095a0e907 100644 --- a/src/winmain/CMakeLists.txt +++ b/src/winmain/CMakeLists.txt @@ -23,6 +23,4 @@ extend_target(WinMain CONDITION NOT WINRT extend_target(WinMain CONDITION MINGW DEFINES QT_NEEDS_QMAIN ) - -extend_target(Core LIBRARIES WinMain) # special case end -- cgit v1.2.3