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>
Tue, 13 Aug 2019 06:53:22 +0000 (02:53 -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

targets/android/android.cmake

index f3aebbb..33843fc 100644 (file)
@@ -47,7 +47,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})