Merge pull request #11538 from akien-mga/cmake-arm-linux-opengl

CMake: Link against OpenGL when using EGL but not GLES2
This commit is contained in:
Henrik Rydgård 2018-11-06 16:17:04 +01:00 committed by GitHub
commit b6742af077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,6 +183,10 @@ if(NOT OPENGL_LIBRARIES AND USING_GLES2)
set(OPENGL_LIBRARIES GLESv2 EGL) set(OPENGL_LIBRARIES GLESv2 EGL)
endif() endif()
if(NOT OPENGL_LIBRARIES)
find_package(OpenGL REQUIRED)
endif()
if(USING_EGL) if(USING_EGL)
if(NOT EGL_LIBRARIES) if(NOT EGL_LIBRARIES)
set(EGL_LIBRARIES EGL) set(EGL_LIBRARIES EGL)
@ -190,10 +194,6 @@ if(USING_EGL)
set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${EGL_LIBRARIES}) set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${EGL_LIBRARIES})
endif() endif()
if(NOT OPENGL_LIBRARIES)
find_package(OpenGL REQUIRED)
endif()
find_package(SDL2) find_package(SDL2)
include(FindThreads) include(FindThreads)