Commit faf699ae authored by Jussi Kukkonen's avatar Jussi Kukkonen Committed by Emil Velikov

cmake: Link utils with xcb explicitly

Linking CXX executables with gold linker leads to:
libpiglitutil_gl.so.0: error: undefined reference to 'xcb_connect'
libpiglitutil_gl.so.0: error: undefined reference to 'xcb_get_setup'
libpiglitutil_gl.so.0: error: undefined reference to 'xcb_setup_roots_iterator'

This may have appeared now because xcb-dri2 used to overlink publicly
but now does not.
Signed-off-by: default avatarJussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
parent f5622dbe
......@@ -155,6 +155,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
pkg_check_modules(LIBDRM QUIET libdrm)
pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel)
pkg_check_modules(XCB QUIET xcb)
pkg_check_modules(XCB_DRI2 QUIET xcb-dri2)
pkg_check_modules(GLPROTO QUIET glproto)
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
......
......@@ -121,11 +121,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
list(APPEND UTIL_GL_LIBS
${LIBDRM_LDFLAGS}
${XCB_LDFLAGS}
${XCB_DRI2_LDFLAGS}
)
list(APPEND UTIL_GL_INCLUDES
${LIBDRM_INCLUDE_DIRS}
${XCB_INCLUDE_DIRS}
${XCB_DRI2_INCLUDE_DIRS}
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment