archeus/cmake/archeus_opengl.cmake

20 lines
No EOL
822 B
CMake

set(ARCHEUS_STD_OPENGL_GRAPHICS_SOURCES
src/graphics/opengl/circle.c
src/graphics/opengl/line.c
src/graphics/opengl/obround.c
src/graphics/opengl/rectangle.c
src/graphics/opengl/sprite.c
src/graphics/opengl/spritesheet.c
src/graphics/opengl/text.c
)
function(opengl_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES ARCHEUS_STD_GRAPHICS_BACKEND)
#add matching files for the selected backends
if(${ARCHEUS_STD_GRAPHICS_BACKEND} STREQUAL "OPENGL")
string(APPEND ${_ARCHEUS_STD_FLAGS} "-lGL -DARC_OPENGL_GRAPHICS ")
list(APPEND ${_ARCHEUS_STD_SOURCES} ${ARCHEUS_STD_OPENGL_GRAPHICS_SOURCES})
endif()
set(${_ARCHEUS_STD_FLAGS} ${${_ARCHEUS_STD_FLAGS}} PARENT_SCOPE)
set(${_ARCHEUS_STD_SOURCES} ${${_ARCHEUS_STD_SOURCES}} PARENT_SCOPE)
endfunction()