1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

fix launcher linking problem for MSVC

This commit is contained in:
Mikhail Paulyshka
2014-10-12 16:40:49 +03:00
parent fff8e10a63
commit 7b7282f52e

View File

@@ -58,8 +58,13 @@ else()
add_executable(vcmilauncher ${launcher_SRCS} ${launcher_UI_HEADERS})
endif()
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
target_link_libraries(vcmilauncher vcmi ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES})
if(MSVC)
# Fix _WinMain@16 linking error
target_link_libraries(vcmilauncher vcmi ${Qt5Core_QTMAIN_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES})
else()
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
target_link_libraries(vcmilauncher vcmi ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES})
endif()
# temporary(?) disabled - generation of PCH takes too much time since cotire is trying to collect all Qt headers
#set_target_properties(vcmilauncher PROPERTIES ${PCH_PROPERTIES})