diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 8d179653f0..2a90556049 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -88,8 +88,13 @@ if(WIN32) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(SRCS ${SRCS} GLInterface/AGL.cpp) elseif(USE_X11) - set(SRCS ${SRCS} GLInterface/GLX.cpp - GLInterface/X11_Util.cpp) + if (NOT USE_EGL) + set(SRCS ${SRCS} GLInterface/GLX.cpp) + # GLX has a hard dependency on libGL. + # Make sure to link to it if using GLX. + set(LIBS ${LIBS} ${OPENGL_LIBRARIES}) + endif() + set(SRCS ${SRCS} GLInterface/X11_Util.cpp) endif() set(SRCS ${SRCS} GLInterface/GLInterface.cpp) diff --git a/Source/Core/VideoBackends/Software/CMakeLists.txt b/Source/Core/VideoBackends/Software/CMakeLists.txt index 42381c02d2..b12ade865c 100644 --- a/Source/Core/VideoBackends/Software/CMakeLists.txt +++ b/Source/Core/VideoBackends/Software/CMakeLists.txt @@ -25,7 +25,6 @@ set(LIBS videocommon SOIL common ${X11_LIBRARIES} - ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES}) add_dolphin_library(videosoftware "${SRCS}" "${LIBS}")