From 1be6901176db7bc6ad779363b1bbdb51cb95b2ab Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 25 Dec 2015 17:59:41 +0100 Subject: [PATCH] Fixed: Link errors under Linux --HG-- branch : develop --- code/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 65e61a8e4..ff097e0a7 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -259,8 +259,10 @@ IF(WITH_QT5) ADD_QT_LIBRARY(XcbQpa) ADD_QT_LIBRARY(PlatformSupport) - SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb) - SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a") + SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb -lGL) + IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a") + SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a") + ENDIF() SET(QT_LIBRARIES ${QT_LIBRARIES} -lfontconfig) ADD_QT_LIBRARY(DBus) ENDIF() @@ -332,7 +334,7 @@ IF(WITH_QT5) ${CARBON_FRAMEWORK} ${SECURITY_FRAMEWORK}) ELSEIF(UNIX) - SET(QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -ldl) + SET(QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -ldl -lrt) ENDIF() ELSE() SET(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::Xml Qt5::Gui Qt5::OpenGL Qt5::Core)