qtmain also needed for Qt5 on Windows

This commit is contained in:
Peter Kümmel 2015-12-09 16:20:54 +01:00
parent a9764cf191
commit 8028110578
2 changed files with 10 additions and 3 deletions

View File

@ -572,6 +572,9 @@ if(LYX_USE_QT MATCHES "QT5")
qt5_wrap_ui(${ARGN})
endmacro()
message(STATUS "Found Qt-Version ${QTVERSION}")
if(WIN32)
set(LYX_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
endif()
endif()
elseif(LYX_USE_QT MATCHES "QT4")
if(LYX_XMINGW)
@ -587,6 +590,9 @@ elseif(LYX_USE_QT MATCHES "QT4")
macro (qt_wrap_uifiles)
qt4_wrap_ui(${ARGN})
endmacro()
if(WIN32)
set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARIES})
endif()
else()
message(FATAL_ERROR "Unhandled value for LYX_USE_QT (${LYX_USE_QT})")
endif()
@ -691,9 +697,10 @@ endif()
if(WIN32)
if(NOT LYX_CONSOLE)
if(LYX_CONSOLE)
set(LYX_QTMAIN_LIBRARY)
else()
set(WIN32_CONSOLE WIN32)
set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY})
endif()
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX)

View File

@ -129,7 +129,7 @@ target_link_libraries(${_lyx}
graphics
support
${ICONV_LIBRARY}
${QT_QTMAIN_LIBRARY}
${LYX_QTMAIN_LIBRARY}
${vld_dll})
qt_use_modules(${_lyx} Core Gui)