Permalink
Browse files

CMake: Link against OpenGL when using EGL but not GLES2

At least for Linux armv7hl this seems to be necessary, otherwise build
fails with:

/usr/bin/ld: lib/libnative.a(GLQueueRunner.cpp.o): undefined reference to symbol 'glStencilOp'
  • Loading branch information...
akien-mga committed Nov 6, 2018
1 parent 67d6e3d commit ea2025c291854c2d2cbc03b1adb90de4079035a4
Showing with 4 additions and 4 deletions.
  1. +4 −4 CMakeLists.txt
@@ -182,17 +182,17 @@ if(NOT OPENGL_LIBRARIES AND USING_GLES2)
set(OPENGL_LIBRARIES GLESv2 EGL)
endif()
if(NOT OPENGL_LIBRARIES)
find_package(OpenGL REQUIRED)
endif()
if(USING_EGL)
if(NOT EGL_LIBRARIES)
set(EGL_LIBRARIES EGL)
endif()
set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${EGL_LIBRARIES})
endif()
if(NOT OPENGL_LIBRARIES)
find_package(OpenGL REQUIRED)
endif()
find_package(SDL2)
include(FindThreads)

0 comments on commit ea2025c

Please sign in to comment.