QT_QTMAIN_LIBRARY is no longer automatically set on Qt5, as it is part of
a deprecated way to link against Qt. Since Quassel needs to support both
Qt4 and Qt5, setting the variable to the appropriate value again works
around the issue until such a time that the CMake requirement is increased
to make use of policy CMP0020.
Note that this is the same workaround cmake itself uses when building
cmake-gui for Windows.
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:YES /NODEFAULTLIB:libcmt")
set(CMAKE_EXE_LINKER_FLAGS_DEBUGFULL "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
link_libraries(Version dwmapi shlwapi)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:YES /NODEFAULTLIB:libcmt")
set(CMAKE_EXE_LINKER_FLAGS_DEBUGFULL "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
link_libraries(Version dwmapi shlwapi)
+ if(USE_QT5)
+ set(QT_QTMAIN_LIBRARY Qt5::WinMain)
+ endif(USE_QT5)
endif(MSVC)
if(HAVE_SSL AND STATIC)
find_package(OpenSSL REQUIRED)
endif(MSVC)
if(HAVE_SSL AND STATIC)
find_package(OpenSSL REQUIRED)