2023-10-29 16:31:36 -06:00
|
|
|
if (NOT ENABLE_ACCELERATED_GRAPHICS OR EMSCRIPTEN)
|
|
|
|
# FIXME: Enable GL emulation in emscripten: https://emscripten.org/docs/porting/multimedia_and_graphics/OpenGL-support.html
|
|
|
|
set(HAS_ACCELERATED_GRAPHICS OFF CACHE BOOL "" FORCE)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2023-11-12 14:18:00 +01:00
|
|
|
if (APPLE)
|
|
|
|
set(HAS_ACCELERATED_GRAPHICS ON CACHE BOOL "" FORCE)
|
|
|
|
set(ACCEL_GFX_LIBS "-framework OpenGL" CACHE STRING "" FORCE)
|
2023-11-27 22:00:43 -05:00
|
|
|
else()
|
|
|
|
find_package(OpenGL QUIET COMPONENTS OpenGL EGL)
|
|
|
|
|
|
|
|
if (OPENGL_FOUND)
|
|
|
|
set(HAS_ACCELERATED_GRAPHICS ON CACHE BOOL "" FORCE)
|
|
|
|
set(ACCEL_GFX_LIBS OpenGL::OpenGL OpenGL::EGL CACHE STRING "" FORCE)
|
|
|
|
else()
|
|
|
|
set(HAS_ACCELERATED_GRAPHICS OFF CACHE BOOL "" FORCE)
|
|
|
|
endif()
|
2023-11-12 14:18:00 +01:00
|
|
|
endif()
|