CMakeLists: relocate EGL library name detection

Raspberry Pi targets require a custom EGL library name (configured in cmake/Toolchains/raspberry.armv*.cmake). Move configuration of EGL_LIBRARIES for generic targets out of SDL2 target to ensure correct library name is used everywhere (including QT builds).

Fixes build on Raspberry Pi.
This commit is contained in:
Conn O'Griofa 2017-12-20 03:38:01 +00:00 committed by GitHub
parent 2822a4f187
commit 20080ba123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)