Skip to content

Commit

Permalink
CMake: Fix FindGLESv2
Browse files Browse the repository at this point in the history
Avoids a linking error when the library is not found as
find_library sets GLESv2_LIBRARY to GLESv2-NOTFOUND

Change-Id: I7ddc15483276e0be0c78b67b760c4d9188758270
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Cristian Adam <[email protected]>
  • Loading branch information
jschueller committed Sep 16, 2020
1 parent a54988c commit cf33d64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/FindGLESv2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ else()
find_path(GLESv2_INCLUDE_DIR NAMES "GLES2/gl2.h" "OpenGLES/ES2/gl.h" DOC "The OpenGLES 2 include path")
find_package(EGL)
set(_libraries "${CMAKE_REQUIRED_LIBRARIES}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${GLESv2_LIBRARY}")
if(GLESv2_LIBRARY)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${GLESv2_LIBRARY}")
endif ()
if(EGL_LIBRARY)
list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}")
endif()
Expand Down

0 comments on commit cf33d64

Please sign in to comment.