archeus/cmake/archeus_none.cmake

43 lines
1.3 KiB
CMake
Raw Normal View History

set(ARCHEUS_NONE_WINDOW_SOURCES
src/graphics/window.c
2024-01-12 19:48:17 -07:00
)
set(ARCHEUS_NONE_INPUT_SOURCES
src/input/input.c
src/input/keyboard.c
src/input/mouse.c
2024-01-12 19:48:17 -07:00
)
set(ARCHEUS_NONE_GRAPHICS_SOURCES
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
2024-01-12 19:48:17 -07:00
)
function(none_check_and_init_needed _ARCHEUS_FLAGS _ARCHEUS_SOURCES ARCHEUS_WINDOW_BACKEND ARCHEUS_INPUT_BACKEND ARCHEUS_GRAPHICS_BACKEND)
2024-01-12 19:48:17 -07:00
#add matching files for the selected backends
if(${ARCHEUS_WINDOW_BACKEND} STREQUAL "NONE")
string(APPEND ${_ARCHEUS_FLAGS} "-DARC_NONE_WINDOW ")
list(APPEND ${_ARCHEUS_SOURCES} ${ARCHEUS_NONE_WINDOW_SOURCES})
2024-01-12 19:48:17 -07:00
endif()
if(${ARCHEUS_INPUT_BACKEND} STREQUAL "NONE")
string(APPEND ${_ARCHEUS_FLAGS} "-DARC_NONE_INPUT ")
list(APPEND ${_ARCHEUS_SOURCES} ${ARCHEUS_NONE_INPUT_SOURCES})
2024-01-12 19:48:17 -07:00
endif()
if(${ARCHEUS_GRAPHICS_BACKEND} STREQUAL "NONE")
string(APPEND ${_ARCHEUS_FLAGS} "-DARC_NONE_GRAPHICS ")
list(APPEND ${_ARCHEUS_SOURCES} ${ARCHEUS_NONE_GRAPHICS_SOURCES})
2024-01-12 19:48:17 -07:00
endif()
set(${_ARCHEUS_FLAGS} ${${_ARCHEUS_FLAGS}} PARENT_SCOPE)
set(${_ARCHEUS_SOURCES} ${${_ARCHEUS_SOURCES}} PARENT_SCOPE)
endfunction()