diff --git a/CMakeLists.txt b/CMakeLists.txt index 628831ba30..7f998be6a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,10 @@ if(NOT OPENGL_LIBRARIES AND USING_GLES2) endif() if(USING_EGL) - set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} EGL) + if(NOT EGL_LIBRARIES) + set(EGL_LIBRARIES EGL) + endif() + set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${EGL_LIBRARIES}) endif() if(NOT OPENGL_LIBRARIES) @@ -748,10 +751,7 @@ elseif(TARGET SDL2::SDL2) set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm) set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY}) elseif(USING_EGL) - if(NOT EGL_LIBRARIES) - set(EGL_LIBRARIES EGL) - endif() - set(nativeExtraLibs ${nativeExtraLibs} pthread ${EGL_LIBRARIES}) + set(nativeExtraLibs ${nativeExtraLibs} pthread) endif() set(TargetBin PPSSPPSDL) elseif(WIN32)