]> git.lyx.org Git - lyx.git/blobdiff - src/CMakeLists.txt
Make sure a pointer is valid before using it
[lyx.git] / src / CMakeLists.txt
index eb350c1774ae418d0eee5c9b343fa1ef2f231478..b7d1b06791f378abdac6740aefeb1807b8823bd2 100644 (file)
@@ -132,8 +132,23 @@ target_link_libraries(${_lyx}
        ${LYX_QTMAIN_LIBRARY}
        ${vld_dll})
 
+if(LYX_USE_QT MATCHES "QT4")
+  target_link_libraries(${_lyx} ${QT_QTSVG_LIBRARY})
+endif()
 qt_use_modules(${_lyx} Core Gui)
 
+if(QT_USES_X11)
+  find_package(X11 REQUIRED)
+  target_link_libraries(${_lyx} ${X11_X11_LIB}) # we need it because we use XSendEvent
+  if(HAVE_QT5_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()
+endif()
+
 lyx_target_link_libraries(${_lyx} HUNSPELL ASPELL ENCHANT Magic)
 
 if(APPLE)
@@ -157,7 +172,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)