2025-02-08 02:15:23 -07:00
|
|
|
set(ARCHEUS_GLFW_WINDOW_SOURCES
|
2024-01-19 01:17:19 -07:00
|
|
|
src/graphics/glfw/config.c
|
|
|
|
|
src/graphics/glfw/renderer.c
|
|
|
|
|
src/graphics/glfw/window.c
|
|
|
|
|
)
|
|
|
|
|
|
2025-02-08 02:15:23 -07:00
|
|
|
set(ARCHEUS_GLFW_INPUT_SOURCES
|
2024-01-19 01:17:19 -07:00
|
|
|
src/input/glfw/keyboard.c
|
|
|
|
|
src/input/glfw/mouse.c
|
|
|
|
|
)
|
|
|
|
|
|
2025-02-08 02:15:23 -07:00
|
|
|
function(glfw_check_and_init_needed _ARCHEUS_FLAGS _ARCHEUS_SOURCES ARCHEUS_WINDOW_BACKEND ARCHEUS_INPUT_BACKEND)
|
2024-01-19 01:17:19 -07:00
|
|
|
#add matching files for the selected backends
|
2025-02-08 02:15:23 -07:00
|
|
|
if(${ARCHEUS_WINDOW_BACKEND} STREQUAL "GLFW")
|
|
|
|
|
string(APPEND ${_ARCHEUS_FLAGS} "-lglfw -DARC_GLFW_WINDOW ")
|
|
|
|
|
list(APPEND ${_ARCHEUS_SOURCES} ${ARCHEUS_GLFW_WINDOW_SOURCES})
|
2024-01-19 01:17:19 -07:00
|
|
|
endif()
|
|
|
|
|
|
2025-02-08 02:15:23 -07:00
|
|
|
if(${ARCHEUS_INPUT_BACKEND} STREQUAL "GLFW")
|
|
|
|
|
string(APPEND ${_ARCHEUS_FLAGS} "-lglfw -lGLEW -DARC_GLFW_INPUT ")
|
|
|
|
|
list(APPEND ${_ARCHEUS_SOURCES} ${ARCHEUS_GLFW_INPUT_SOURCES})
|
2024-01-19 01:17:19 -07:00
|
|
|
endif()
|
|
|
|
|
|
2025-02-08 02:15:23 -07:00
|
|
|
set(${_ARCHEUS_FLAGS} ${${_ARCHEUS_FLAGS}} PARENT_SCOPE)
|
|
|
|
|
set(${_ARCHEUS_SOURCES} ${${_ARCHEUS_SOURCES}} PARENT_SCOPE)
|
|
|
|
|
endfunction()
|