add_library(libScePad SHARED EXCLUDE_FROM_ALL
    ${CMAKE_CURRENT_SOURCE_DIR}/Export.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/InventoryExports.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/src/PadState.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/src/HostVolumeState.cpp
)
target_include_directories(libScePad PRIVATE ${LIBS_INCLUDE_DIR})
set_target_properties(libScePad PROPERTIES CXX_EXTENSIONS OFF)
configure_windows_unwind(libScePad)

if(BUILD_TESTING)
    add_test_executable(host_audio_in_control_tests tests/HostAudioInControl.cpp)
    target_include_directories(host_audio_in_control_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(host_audio_in_control_tests PRIVATE libScePad libc)
    configure_windows_unwind(host_audio_in_control_tests)
    add_test(NAME host_audio_in_control COMMAND host_audio_in_control_tests)
    if(WIN32)
        set_tests_properties(host_audio_in_control PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>;PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
    endif()
endif()

if(BUILD_TESTING)
    add_test_executable(guest_pad_tests ${LIBS_INCLUDE_DIR}/tests/GuestPad.cpp)
    target_include_directories(guest_pad_tests PRIVATE ${LIBS_INCLUDE_DIR} ${ANYPS5_SDL2_INCLUDE_DIR})
    target_link_libraries(guest_pad_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_tests)
    add_test(NAME guest_pad COMMAND guest_pad_tests)
    if(WIN32)
        set_tests_properties(guest_pad PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

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

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

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

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

if(BUILD_TESTING)
    add_test_executable(guest_pad_recording_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadRecording.cpp)
    target_include_directories(guest_pad_recording_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_recording_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_recording_tests)
    add_test(NAME guest_pad_recording COMMAND guest_pad_recording_tests)
    set_tests_properties(guest_pad_recording PROPERTIES TIMEOUT 30)
    if(WIN32)
        set_tests_properties(guest_pad_recording PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

if(BUILD_TESTING)
    add_test_executable(guest_pad_controller_queries_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadControllerQueries.cpp)
    target_include_directories(guest_pad_controller_queries_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_controller_queries_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_controller_queries_tests)
    add_test(NAME guest_pad_controller_queries COMMAND guest_pad_controller_queries_tests)
    if(WIN32)
        set_tests_properties(guest_pad_controller_queries PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
    add_test_executable(guest_pad_firmware_checks_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadFirmwareChecks.cpp)
    target_include_directories(guest_pad_firmware_checks_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_firmware_checks_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_firmware_checks_tests)
    add_test(NAME guest_pad_firmware_checks COMMAND guest_pad_firmware_checks_tests)
    add_test_executable(guest_pad_query_guest_pointer_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadQueryGuestPointers.cpp)
    target_include_directories(guest_pad_query_guest_pointer_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_query_guest_pointer_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_query_guest_pointer_tests)
    add_test(NAME guest_pad_query_guest_pointers COMMAND guest_pad_query_guest_pointer_tests)
    if(WIN32)
        set_tests_properties(guest_pad_firmware_checks PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
        set_tests_properties(guest_pad_query_guest_pointers PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

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

if(BUILD_TESTING)
    add_test_executable(guest_pad_device_model_queries_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadDeviceModelQueries.cpp)
    target_include_directories(guest_pad_device_model_queries_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_device_model_queries_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_device_model_queries_tests)
    add_test(NAME guest_pad_device_model_queries COMMAND guest_pad_device_model_queries_tests)
    if(WIN32)
        set_tests_properties(guest_pad_device_model_queries PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
    add_test_executable(guest_pad_handle_validation_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadHandleValidation.cpp)
    target_include_directories(guest_pad_handle_validation_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_handle_validation_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_handle_validation_tests)
    add_test(NAME guest_pad_handle_validation COMMAND guest_pad_handle_validation_tests)
    if(WIN32)
        set_tests_properties(guest_pad_handle_validation PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

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

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

if(BUILD_TESTING)
    add_test_executable(pad_rumble_intensity_tests tests/PadRumbleIntensity.cpp)
    target_include_directories(pad_rumble_intensity_tests PRIVATE ${LIBS_INCLUDE_DIR})
    configure_host_test_executable(pad_rumble_intensity_tests)
    add_test(NAME pad_rumble_intensity COMMAND pad_rumble_intensity_tests)
    set_tests_properties(pad_rumble_intensity PROPERTIES TIMEOUT 30)
endif()

if(BUILD_TESTING)
    add_test_executable(pad_identify_tests tests/PadIdentify.cpp)
    target_include_directories(pad_identify_tests PRIVATE ${LIBS_INCLUDE_DIR})
    configure_host_test_executable(pad_identify_tests)
    add_test(NAME pad_identify COMMAND pad_identify_tests)
    set_tests_properties(pad_identify PROPERTIES TIMEOUT 30)
endif()

if(BUILD_TESTING)
    add_test_executable(guest_pad_bond_refresh_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadBondUpdate.cpp)
    target_include_directories(guest_pad_bond_refresh_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_bond_refresh_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_bond_refresh_tests)
    add_test(NAME guest_pad_bond_update COMMAND guest_pad_bond_refresh_tests)
    if(WIN32)
        set_tests_properties(guest_pad_bond_update PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
    add_test_executable(guest_pad_controller_refresh_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadControllerUpdate.cpp)
    target_include_directories(guest_pad_controller_refresh_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_controller_refresh_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_controller_refresh_tests)
    add_test(NAME guest_pad_controller_update COMMAND guest_pad_controller_refresh_tests)
    if(WIN32)
        set_tests_properties(guest_pad_controller_update PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

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

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

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

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

if(BUILD_TESTING)
    add_test_executable(guest_pad_handle_close_bounds_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadHandleCloseBounds.cpp)
    target_include_directories(guest_pad_handle_close_bounds_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_handle_close_bounds_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_handle_close_bounds_tests)
    add_test(NAME guest_pad_handle_close_bounds COMMAND guest_pad_handle_close_bounds_tests)
    if(WIN32)
        set_tests_properties(guest_pad_handle_close_bounds PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
    add_test_executable(guest_pad_brightness_extension_bounds_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadBrightnessExtensionBounds.cpp)
    target_include_directories(guest_pad_brightness_extension_bounds_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_brightness_extension_bounds_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_brightness_extension_bounds_tests)
    add_test(NAME guest_pad_brightness_extension_bounds COMMAND guest_pad_brightness_extension_bounds_tests)
    if(WIN32)
        set_tests_properties(guest_pad_brightness_extension_bounds PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

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

    add_test_executable(guest_pad_get_data_internal_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadGetDataInternal.cpp)
    target_include_directories(guest_pad_get_data_internal_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_get_data_internal_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_get_data_internal_tests)
    add_test(NAME guest_pad_get_data_internal COMMAND guest_pad_get_data_internal_tests)
    if(WIN32)
        set_tests_properties(guest_pad_get_data_internal PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

if(BUILD_TESTING)
    add_test_executable(guest_pad_initial_user_handle_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadInitialUserHandle.cpp)
    target_include_directories(guest_pad_initial_user_handle_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_initial_user_handle_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_initial_user_handle_tests)
    add_test(NAME guest_pad_initial_user_handle COMMAND guest_pad_initial_user_handle_tests)
    set_tests_properties(guest_pad_initial_user_handle PROPERTIES TIMEOUT 20)
    if(WIN32)
        set_tests_properties(guest_pad_initial_user_handle PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
    add_test_executable(guest_pad_legacy_audio_haptics_bounds_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadLegacyAudioHapticsBounds.cpp)
    target_include_directories(guest_pad_legacy_audio_haptics_bounds_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_legacy_audio_haptics_bounds_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_legacy_audio_haptics_bounds_tests)
    add_test(NAME guest_pad_legacy_audio_haptics_bounds COMMAND guest_pad_legacy_audio_haptics_bounds_tests)
    set_tests_properties(guest_pad_legacy_audio_haptics_bounds PROPERTIES TIMEOUT 20)
    if(WIN32)
        set_tests_properties(guest_pad_legacy_audio_haptics_bounds PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()

if(BUILD_TESTING)
    add_test_executable(pad_descriptor_bounds_tests tests/PadDescriptorBounds.cpp)
    target_include_directories(pad_descriptor_bounds_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(pad_descriptor_bounds_tests PRIVATE libScePad libc)
    configure_windows_unwind(pad_descriptor_bounds_tests)
    add_test(NAME pad_descriptor_bounds COMMAND pad_descriptor_bounds_tests)
    if(WIN32)
        set_tests_properties(pad_descriptor_bounds PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>;PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
    endif()
endif()

if(BUILD_TESTING)
    add_test_executable(guest_pad_haptics_bounds_tests ${LIBS_INCLUDE_DIR}/tests/GuestPadHapticsBounds.cpp)
    target_include_directories(guest_pad_haptics_bounds_tests PRIVATE ${LIBS_INCLUDE_DIR})
    target_link_libraries(guest_pad_haptics_bounds_tests PRIVATE libScePad libc)
    configure_windows_unwind(guest_pad_haptics_bounds_tests)
    add_test(NAME guest_pad_haptics_bounds COMMAND guest_pad_haptics_bounds_tests)
    set_tests_properties(guest_pad_haptics_bounds PROPERTIES TIMEOUT 20)
    if(WIN32)
        set_tests_properties(guest_pad_haptics_bounds PROPERTIES ENVIRONMENT_MODIFICATION
            "PATH=path_list_prepend:$<TARGET_FILE_DIR:libScePad>")
    endif()
endif()
