]> git.lyx.org Git - features.git/blobdiff - src/CMakeLists.txt
Cmake build: Add needed libraries if using QT5_Extras
[features.git] / src / CMakeLists.txt
index eb350c1774ae418d0eee5c9b343fa1ef2f231478..ffcb34debd9717f7401cb8584e75f4217be3b43d 100644 (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)
@@ -157,7 +165,7 @@ project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
 
 install(TARGETS ${_lyx} 
     BUNDLE DESTINATION . COMPONENT Runtime
-    RUNTIME DESTINATION bin COMPONENT Runtime)
+    RUNTIME DESTINATION ${LYX_UTILITIES_INSTALL_PATH} COMPONENT Runtime)
 
 if(LYX_BUNDLE)
        if(APPLE)