set(ARCHEUS_STD_OPENGL_GRAPHICS_SOURCES
    packages/graphics/opengl/circle.c
    packages/graphics/opengl/line.c
    packages/graphics/opengl/obround.c
    packages/graphics/opengl/rectangle.c
    packages/graphics/opengl/sprite.c
    packages/graphics/opengl/spritesheet.c
    packages/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()