Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:Factory
cegui
0006-OpenGLES-Renderer-Fix-dependency-on-EGL-on...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-OpenGLES-Renderer-Fix-dependency-on-EGL-on-non-APPLE.patch of Package cegui
From faa536589fd177d6abf40035f7d0583d016e4e11 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen <rpm@fthiessen.de> Date: Tue, 11 May 2021 19:00:55 +0200 Subject: [PATCH 6/6] OpenGLES Renderer: Fix dependency on EGL on non APPLE OpenGLES (v1) renderer requires EGL on non Apple systems, see FBOTextureTarget.cpp, so we nee to look for the EGL library to prevent undefined references. Backported from master --- CMakeLists.txt | 5 ++++ .../RendererModules/OpenGLES/CMakeLists.txt | 3 +++ cmake/FindEGL.cmake | 23 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 cmake/FindEGL.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 96972ae55..9c8000144 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,6 +394,11 @@ endif() # Option wether to build application templates; default off option(CEGUI_BUILD_APPLICATION_TEMPLATES "Specifies whether to build the application templates." TRUE) +if (NOT APPLE AND CEGUI_BUILD_RENDERER_OPENGLES) + find_package(EGL) + set(CEGUI_BUILD_RENDERER_OPENGLES ${EGL_FOUND} CACHE BOOL "OpenGL ES 1 RenderSystem requires EGL on other systems than APPLE" FORCE) +endif() + if (WIN32 OR APPLE) set (CEGUI_BUILD_SUFFIX "_d" CACHE STRING "String holding a suffix appended to the name of output binaries (under CMake build, only used for debug).") else() diff --git a/cegui/src/RendererModules/OpenGLES/CMakeLists.txt b/cegui/src/RendererModules/OpenGLES/CMakeLists.txt index e7090ff3a..d3907dfa6 100644 --- a/cegui/src/RendererModules/OpenGLES/CMakeLists.txt +++ b/cegui/src/RendererModules/OpenGLES/CMakeLists.txt @@ -4,6 +4,9 @@ cegui_gather_files() cegui_add_library(${CEGUI_TARGET_NAME} CORE_SOURCE_FILES CORE_HEADER_FILES) cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGLES PRIVATE TRUE) +if (NOT APPLE) + cegui_add_dependency(${CEGUI_TARGET_NAME} EGL PRIVATE TRUE) +endif() cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME}) diff --git a/cmake/FindEGL.cmake b/cmake/FindEGL.cmake new file mode 100644 index 000000000..f779d0a80 --- /dev/null +++ b/cmake/FindEGL.cmake @@ -0,0 +1,23 @@ +# Try to find EGL library and include dir. +# Once done this will define +# +# EGL_FOUND - true if EGL has been found +# EGL_INCLUDE_DIR - where the EGL/egl.h and KHR/khrplatform.h can be found +# EGL_LIBRARIES - link this to use libEGL.so.1 + +include(FindPackageHandleStandardArgs) + +find_path(EGL_H_PATH NAMES EGL/egl.h) +find_library(EGL_LIB NAMES EGL) +mark_as_advanced(EGL_H_PATH EGL_LIB) + +cegui_find_package_handle_standard_args(EGL EGL_LIB EGL_H_PATH) + +if (EGL_FOUND) + set (EGL_INCLUDE_DIR ${EGL_H_PATH}) + set (EGL_LIBRARIES ${EGL_LIB}) +else() + set (EGL_INCLUDE_DIR) + set (EGL_LIBRARIES) +endif() + -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor