add_granite_internal_lib(granite-input input.hpp input.cpp)
target_include_directories(granite-input PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(granite-input PUBLIC granite-util granite-event granite-math)

if (${GRANITE_PLATFORM} MATCHES "SDL")
    add_granite_internal_static_lib(granite-input-sdl input_sdl.cpp input_sdl.hpp)
    target_link_libraries(granite-input-sdl PUBLIC granite-input)
    if (GRANITE_SYSTEM_SDL)
        find_package(SDL3 REQUIRED)
        target_link_libraries(granite-input-sdl PUBLIC SDL3::SDL3-shared)
    else()
        target_link_libraries(granite-input-sdl PUBLIC SDL3-static)
    endif()
endif()