Move OpenGL runtime classification into renderer backend

This commit is contained in:
2026-06-04 19:28:34 +02:00
parent 0489c4229e
commit 11c7d87330
7 changed files with 53 additions and 16 deletions

View File

@@ -180,6 +180,17 @@ if(PP_ENABLE_OPENGL)
pp_project_options
PRIVATE
pp_project_warnings)
if(EMSCRIPTEN)
target_compile_definitions(pp_renderer_gl PRIVATE
PP_RENDERER_GL_RUNTIME_GLES=1
PP_RENDERER_GL_RUNTIME_WEB=1)
elseif(ANDROID OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
target_compile_definitions(pp_renderer_gl PRIVATE
PP_RENDERER_GL_RUNTIME_GLES=1)
else()
target_compile_definitions(pp_renderer_gl PRIVATE
PP_RENDERER_GL_RUNTIME_DESKTOP=1)
endif()
endif()
add_library(pp_paint_renderer STATIC