Windows: Fix linker warning about missing WinMain.pdb
Do follow the example of winmain.pro and replace /Zi with /Z7. Manipulating CMAKE_CXX_FLAGS_DEBUG is not particularly elegant, but CMake seems not to offer a more modern way yet: https://gitlab.kitware.com/cmake/cmake/-/issues/19084 Fixes: QTBUG-86423 Change-Id: I280d06ad52b79d4be04052ab4e0d2113ef08414c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
e957e9c28f
commit
61a9038877
@ -14,6 +14,12 @@ qt_add_module(WinMain
|
||||
$<TARGET_PROPERTY:Qt::Core,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
# Store debug information inside the static lib
|
||||
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
endif()
|
||||
|
||||
set_property(TARGET WinMain PROPERTY OUTPUT_NAME qtmain)
|
||||
|
||||
qt_extend_target(WinMain CONDITION
|
||||
|
Loading…
x
Reference in New Issue
Block a user