From 61406a43495d35304a19a5d4f4c78a058e9e5d96 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Fri, 25 May 2018 00:12:07 +0100 Subject: [PATCH] cmake: Fix GSdx EGL build libX11-xcb linkage issue Prevents a XGetXCBConnection undefined symbol error. --- cmake/SearchForStuff.cmake | 1 + cmake/SelectPcsx2Plugins.cmake | 2 +- plugins/GSdx/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 3bf2f2182d..e4b3e497d1 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -94,6 +94,7 @@ if(Linux) endif() if(EGL_API) check_lib(EGL EGL EGL/egl.h) + check_lib(X11_XCB X11-xcb X11/Xlib-xcb.h) endif() if(OPENCL_API) check_lib(OPENCL OpenCL CL/cl.hpp) diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index c0e395dfbf..dd27d0183d 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -141,7 +141,7 @@ endif() # -X11 # -zlib #--------------------------------------- -if(OPENGL_FOUND AND X11_FOUND AND GTKn_FOUND AND ZLIB_FOUND AND PNG_FOUND AND FREETYPE_FOUND AND LIBLZMA_FOUND AND (EGL_FOUND OR NOT EGL_API)) +if(OPENGL_FOUND AND X11_FOUND AND GTKn_FOUND AND ZLIB_FOUND AND PNG_FOUND AND FREETYPE_FOUND AND LIBLZMA_FOUND AND ((EGL_FOUND AND X11_XCB_FOUND) OR NOT EGL_API)) set(GSdx TRUE) elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/GSdx") set(GSdx FALSE) diff --git a/plugins/GSdx/CMakeLists.txt b/plugins/GSdx/CMakeLists.txt index 18f6b3879d..86b556f882 100644 --- a/plugins/GSdx/CMakeLists.txt +++ b/plugins/GSdx/CMakeLists.txt @@ -272,7 +272,7 @@ set(GSdxFinalLibs ) if(EGL_API AND EGL_FOUND) - set(GSdxFinalLibs ${GSdxFinalLibs} ${EGL_LIBRARIES}) + set(GSdxFinalLibs ${GSdxFinalLibs} ${EGL_LIBRARIES} ${X11_XCB_LIBRARIES}) endif() if(USE_VTUNE)