set(inc "inc")
set(privinc "privinc")
set(src "src/pad.c")

if(PS1_BUILD)
    set(src ${src} "ps1/src/pad.c")
    set(inc ${inc} "ps1/inc")
    set(deps ${deps} PSXSDK::PSXSDK)
elseif(SDL1_2_BUILD)
    set(src ${src} "sdl-1.2/src/pad.c")
    set(inc ${inc} "sdl-1.2/inc")
    set(deps ${deps} SDL::SDL)
elseif(ESP32_BUILD)
    set(src ${src} "esp32/src/pad.c")
    set(inc ${inc} "esp32/inc")
endif()

add_library(pad ${src})
target_include_directories(pad PUBLIC ${inc} PRIVATE ${privinc})
target_link_libraries(pad PUBLIC ${deps})
