Work around issue of missing Windows qtmain static library
Applications that have the WIN32_EXECUTABLE property set, must have a WinMain function. In qmake's case, this function is provided by the qtmain static library. Until that is implemented in CMake land, disable the property on Windows for all qt executables. This fixes the linker issues while building examples. Task-number: QTBUG-75195 Change-Id: I323d4dd899f716cd6b9b7f4b5ecb76b22f462fc4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
parent
6630937e63
commit
51b7fbb626
@ -852,6 +852,12 @@ function(add_qt_executable name)
|
||||
MACOSX_BUNDLE "${arg_GUI}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# Workaround for not having ported the winmain / qtmain static library
|
||||
# which is always linked in by qmake.
|
||||
set_target_properties("${name}" PROPERTIES WIN32_EXECUTABLE 0)
|
||||
endif()
|
||||
|
||||
if(NOT arg_NO_INSTALL)
|
||||
install(TARGETS "${name}"
|
||||
RUNTIME DESTINATION "${arg_INSTALL_DIRECTORY}"
|
||||
|
Loading…
Reference in New Issue
Block a user