add_library(libSceConvertKeycode SHARED EXCLUDE_FROM_ALL Export.cpp)
target_include_directories(libSceConvertKeycode PRIVATE ${LIBS_INCLUDE_DIR})
configure_windows_unwind(libSceConvertKeycode)

if(BUILD_TESTING)
    add_test_executable(guest_convert_keycode_tests ${LIBS_INCLUDE_DIR}/tests/GuestConvertKeycode.cpp)
    target_include_directories(guest_convert_keycode_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_convert_keycode_tests PRIVATE libSceConvertKeycode libc)
    configure_windows_unwind(guest_convert_keycode_tests)
    add_test(NAME guest_convert_keycode COMMAND guest_convert_keycode_tests)
    if(WIN32)
        set_tests_properties(guest_convert_keycode PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceConvertKeycode>")
    endif()
endif()
