Always dynamically lookup egl functions
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Wed, 10 Apr 2019 21:25:16 +0000 (15:25 -0600)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 26 Jun 2020 09:50:07 +0000 (05:50 -0400)
Android's latest NDK includes support for EGL 1.5 functions.
However, only for API level 29. But due to unified headers
folks building for older API levels will also see the new
functions but won't be able to link. Making the egl functions
dynamic avoids build time issues.

Change-Id: I718e28c7422faf3c7b964ca70b86a1711a08ae54
Affects: EGL
Bug: 1873
(cherry picked from commit 9af8b5c1ad98342a634b79a1f9c1213632248c64)

targets/android/android.cmake

index 44e97c6..c2f1f26 100644 (file)
@@ -48,7 +48,8 @@ set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
 if (IS_DIRECTORY ${ANGLE_LIBS})
        find_library(EGL_LIBRARY NAMES EGL_angle PATHS ${ANGLE_LIBS} NO_DEFAULT_PATH)
 else()
-       find_library(EGL_LIBRARY EGL PATHS /usr/lib)
+       # Disable static linking by clearing EGL_LIBRARY
+       set(EGL_LIBRARY   )
 endif()
 set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})