diff options
author | Alan Swanson <reiver@improbability.net> | 2022-12-19 21:28:13 +0200 |
---|---|---|
committer | Vasyl Gello <vasek.gello@gmail.com> | 2022-12-31 08:42:17 +0200 |
commit | 3fed131284b53b0e42c87c672f02dc3e91e40b22 (patch) | |
tree | f79212eb3878d521a02fa892080e5b6cb62c39a0 /cmake | |
parent | fe42d519b8b771149e458b5be553e7303e6a56a4 (diff) |
Work around Mesa eglchromium.h removal
I have polished Alan's snippet to buildable state and tested
on Kodi from Debian sid.
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindEGL.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/modules/FindEGL.cmake b/cmake/modules/FindEGL.cmake index b00fe08a25..a68a8db901 100644 --- a/cmake/modules/FindEGL.cmake +++ b/cmake/modules/FindEGL.cmake @@ -9,6 +9,7 @@ # EGL_INCLUDE_DIRS - the EGL include directory # EGL_LIBRARIES - the EGL libraries # EGL_DEFINITIONS - the EGL definitions +# HAVE_EGLEXTANGLE - if eglext_angle.h exists else use eglextchromium.h # # and the following imported targets:: # @@ -35,6 +36,11 @@ if(EGL_FOUND) set(EGL_LIBRARIES ${EGL_LIBRARY}) set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR}) set(EGL_DEFINITIONS -DHAS_EGL=1) + include(CheckIncludeFiles) + check_include_files("EGL/egl.h;EGL/eglext.h;EGL/eglext_angle.h" HAVE_EGLEXTANGLE) + if(HAVE_EGLEXTANGLE) + list(APPEND EGL_DEFINITIONS "-DHAVE_EGLEXTANGLE=1") + endif() if(NOT TARGET EGL::EGL) add_library(EGL::EGL UNKNOWN IMPORTED) |