Cmake build: Add needed libraries if using QT5_Extras

Commit cb0c881 does this already for automake.
This commit is contained in:
Kornel Benko 2016-07-11 19:08:11 +02:00
parent ad9887da9c
commit 59ac7ce660
2 changed files with 9 additions and 0 deletions

View File

@ -241,6 +241,7 @@ if(LYX_USE_QT MATCHES "QT5")
"
QT_HAS_X11_EXTRAS)
set(HAVE_QT5_X11_EXTRAS ${QT_HAS_X11_EXTRAS})
set(LYX_QT5_X11_EXTRAS_LIBRARY ${_x11extra_link_libraries})
endif()
if (Qt5WinExtras_FOUND)
get_target_property(_winextra_prop Qt5::WinExtras IMPORTED_CONFIGURATIONS)

View File

@ -134,6 +134,14 @@ target_link_libraries(${_lyx}
qt_use_modules(${_lyx} Core Gui)
if(QT_HAS_X11_EXTRAS)
find_library(XCB_LIBRARY NAMES xcb)
if (XCB_LIBRARY MATCHES "NOTFOUND")
message(FATAL_ERROR "Need xcb library to use with QT5_X11_EXTRAS")
endif()
target_link_libraries(${_lyx} ${LYX_QT5_X11_EXTRAS_LIBRARY} ${XCB_LIBRARY})
endif()
lyx_target_link_libraries(${_lyx} HUNSPELL ASPELL ENCHANT Magic)
if(APPLE)