diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-15 17:04:27 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-17 12:13:00 +0200 |
commit | b5af1408099dedd132f36e04d19cb5771a23ec28 (patch) | |
tree | 85109c13469dcde91aea87e29ed52c116732fbf8 /src/corelib/Qt6CoreMacros.cmake | |
parent | 8ec4fd9cffe7977f6d7cb68ce38de4386a5795d6 (diff) |
Generalize the winmain/qtmain entry-point library
The use-case is relevant for other platforms as well.
Now that Qt has a module system we can also replace a lot of the
hand crafted logic for linking with simpler constructs.
Change-Id: Ib6853aaf81bfea79c31f2de741d65b4b56f23ef6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/Qt6CoreMacros.cmake')
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 4a60d61eea..26ab044856 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1370,7 +1370,7 @@ function(_qt_internal_setup_startup_target) set_target_properties("${target}" PROPERTIES "${initialized_prop}" TRUE) endif() - # On Windows this enables automatic linkage to WinMain. + # On Windows this enables automatic linkage to QtEntryPoint. # On iOS this enables automatic passing of a linker flag that will change the default # entry point of the linked executable. set(isExe "$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>") @@ -1378,7 +1378,7 @@ function(_qt_internal_setup_startup_target) if(WIN32) set(isWin32 "$<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>") set(isPolicyNEW "$<TARGET_POLICY:CMP0020>") - set(finalGenex "$<$<AND:${isExe},${isWin32},${isNotExcluded},${isPolicyNEW}>:Qt::WinMain>") + set(finalGenex "$<$<AND:${isExe},${isWin32},${isNotExcluded},${isPolicyNEW}>:Qt::EntryPoint>") # Use set_target_properties instead of target_link_libraries because the latter has some # weird additional behavior of checking which project the target belongs to, and might |