From 88ca26c41856144752ca60e77804933d6157e90a Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 16 Jan 2024 19:56:59 +0100 Subject: [PATCH] Define extpointer for SDL + OGLES2 --- source/Irrlicht/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index a3abd1b8..05744d96 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -184,6 +184,7 @@ endif() if(ENABLE_OPENGL) add_definitions(-D_IRR_COMPILE_WITH_OPENGL_) + set(OPENGL_DIRECT_LINK TRUE) # not yet possible to remove this if(DEVICE STREQUAL "WINDOWS") add_definitions(-D_IRR_COMPILE_WITH_WGL_MANAGER_ -D_IRR_OPENGL_USE_EXTPOINTER_) elseif(DEVICE STREQUAL "X11") @@ -199,6 +200,7 @@ if(ENABLE_OPENGL3) if (NOT USE_SDL2) message(FATAL_ERROR "OpenGL 3 driver requires SDL2") endif() + set(OPENGL_DIRECT_LINK TRUE) # TODO set(USE_SDLGL ON) set(USE_SDLGL3 ON) endif() @@ -208,6 +210,7 @@ if(ENABLE_GLES1) message(FATAL_ERROR "OpenGL ES 1 is not supported with SDL2") endif() add_definitions(-D_IRR_COMPILE_WITH_OGLES1_) + set(OPENGLES_DIRECT_LINK TRUE) if(DEVICE MATCHES "^(WINDOWS|X11|ANDROID)$") add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_ -D_IRR_OGLES1_USE_EXTPOINTER_) endif() @@ -215,9 +218,11 @@ endif() if(ENABLE_GLES2) add_definitions(-D_IRR_COMPILE_WITH_OGLES2_) + set(OPENGLES2_DIRECT_LINK TRUE) # not yet possible to remove this if(DEVICE MATCHES "^(WINDOWS|X11|ANDROID)$" OR EMSCRIPTEN) add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_ -D_IRR_OGLES2_USE_EXTPOINTER_) elseif(DEVICE STREQUAL "SDL") + add_definitions(-D_IRR_OGLES2_USE_EXTPOINTER_) set(USE_SDLGL ON) set(USE_SDLGLES2 ON) endif() @@ -315,9 +320,9 @@ set(link_libs "${PNG_LIBRARY}" "$<$:${SDL2_LIBRARIES}>" - ${OPENGL_LIBRARIES} - ${OPENGLES_LIBRARY} - ${OPENGLES2_LIBRARIES} + "$<$:${OPENGL_LIBRARIES}>" + "$<$:${OPENGLES_LIBRARIES}>" + "$<$:${OPENGLES2_LIBRARIES}>" ${EGL_LIBRARY} "$<$:-landroid -llog>"