f***ed up and needed to rework packages

This commit is contained in:
herbglitch 2024-05-20 03:46:04 -06:00
parent f4592ae8d0
commit b43ab1702f
73 changed files with 194 additions and 2045 deletions

View file

@ -1,22 +1,23 @@
set(ARCHEUS_STD_NONE_WINDOW_SOURCES
src/graphics/none/window.c
src/graphics/window.c
)
set(ARCHEUS_STD_NONE_INPUT_SOURCES
src/input/none/keyboard.c
src/input/none/mouse.c
src/input/input.c
src/input/keyboard.c
src/input/mouse.c
)
set(ARCHEUS_STD_NONE_GRAPHICS_SOURCES
src/graphics/none/circle.c
src/graphics/none/config.c
src/graphics/none/line.c
src/graphics/none/obround.c
src/graphics/none/rectangle.c
src/graphics/none/renderer.c
src/graphics/none/sprite.c
src/graphics/none/spritesheet.c
src/graphics/none/text.c
src/graphics/circle.c
src/graphics/config.c
src/graphics/line.c
src/graphics/obround.c
src/graphics/rectangle.c
src/graphics/renderer.c
src/graphics/sprite.c
src/graphics/spritesheet.c
src/graphics/text.c
)
function(none_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES ARCHEUS_STD_WINDOW_BACKEND ARCHEUS_STD_INPUT_BACKEND ARCHEUS_STD_GRAPHICS_BACKEND)

View file

@ -1,11 +1,11 @@
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
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)

View file

@ -1,25 +1,26 @@
set(ARCHEUS_STD_SDL2_WINDOW_SOURCES
src/graphics/sdl/window.c
src/graphics/sdl/renderer.c
packages/graphics/sdl/window.c
packages/graphics/sdl/renderer.c
)
set(ARCHEUS_STD_SDL2_INPUT_SOURCES
src/input/sdl/keyboard.c
src/input/sdl/mouse.c
packages/input/sdl/input.c
packages/input/sdl/keyboard.c
packages/input/sdl/mouse.c
)
set(ARCHEUS_STD_SDL2_GRAPHICS_SOURCES
src/graphics/sdl/circle.c
src/graphics/sdl/config.c
src/graphics/sdl/line.c
src/graphics/sdl/obround.c
src/graphics/sdl/rectangle.c
src/graphics/sdl/sprite.c
src/graphics/sdl/spritesheet.c
src/graphics/sdl/text.c
packages/graphics/sdl/circle.c
packages/graphics/sdl/config.c
packages/graphics/sdl/line.c
packages/graphics/sdl/obround.c
packages/graphics/sdl/rectangle.c
packages/graphics/sdl/sprite.c
packages/graphics/sdl/spritesheet.c
packages/graphics/sdl/text.c
)
function(sdl2_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES _ARCHEUS_STD_INCLUDE_DIRECTORIES _ARCHEUS_STD_LINK_LIBRARIES ARCHEUS_STD_WINDOW_BACKEND ARCHEUS_STD_INPUT_BACKEND ARCHEUS_STD_GRAPHICS_BACKEND)
function(sdl2_check_and_init_needed _ARCHEUS_STD_SOURCES _ARCHEUS_STD_INCLUDE_DIRECTORIES _ARCHEUS_STD_LINK_LIBRARIES ARCHEUS_STD_WINDOW_BACKEND ARCHEUS_STD_INPUT_BACKEND ARCHEUS_STD_GRAPHICS_BACKEND)
#if no backend uses sdl return
if(NOT ${ARCHEUS_STD_WINDOW_BACKEND} STREQUAL "SDL2" AND NOT ${ARCHEUS_STD_INPUT_BACKEND} STREQUAL "SDL2" AND NOT ${ARCHEUS_STD_GRAPHICS_BACKEND} STREQUAL "SDL2")
return()
@ -40,12 +41,10 @@ function(sdl2_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES _ARC
#add matching files for the selected backends
if(${ARCHEUS_STD_WINDOW_BACKEND} STREQUAL "SDL2")
string(APPEND ${_ARCHEUS_STD_FLAGS} "-DARC_SDL2_WINDOW ")
list(APPEND ${_ARCHEUS_STD_SOURCES} ${ARCHEUS_STD_SDL2_WINDOW_SOURCES})
endif()
if(${ARCHEUS_STD_INPUT_BACKEND} STREQUAL "SDL2")
string(APPEND ${_ARCHEUS_STD_FLAGS} "-DARC_SDL2_INPUT ")
list(APPEND ${_ARCHEUS_STD_SOURCES} ${ARCHEUS_STD_SDL2_INPUT_SOURCES})
endif()
@ -53,7 +52,6 @@ function(sdl2_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES _ARC
find_package(SDL2_image REQUIRED)
find_package(SDL2_ttf REQUIRED)
string(APPEND ${_ARCHEUS_STD_FLAGS} "-DARC_SDL2_GRAPHICS ")
list(APPEND ${_ARCHEUS_STD_SOURCES} ${ARCHEUS_STD_SDL2_GRAPHICS_SOURCES})
#add to include directories
@ -68,7 +66,6 @@ function(sdl2_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES _ARC
)
endif()
set(${_ARCHEUS_STD_FLAGS} ${${_ARCHEUS_STD_FLAGS}} PARENT_SCOPE)
set(${_ARCHEUS_STD_SOURCES} ${${_ARCHEUS_STD_SOURCES}} PARENT_SCOPE)
set(${_ARCHEUS_STD_INCLUDE_DIRECTORIES} ${${_ARCHEUS_STD_INCLUDE_DIRECTORIES}} PARENT_SCOPE)
set(${_ARCHEUS_STD_LINK_LIBRARIES} ${${_ARCHEUS_STD_LINK_LIBRARIES}} PARENT_SCOPE)