Add sfJoystick tests

These are just copied from the SFML sf::Joystick tests with minor
changes to adhere to the CSFML API.
This commit is contained in:
Chris Thrasher committed 2024-06-24 20:50:07 -06:00
1 parent ed8babaf41
commit 9b96c2a797
2 files changed
+76

No files matched your search

+8
View File
@@ -30,7 +30,15 @@ target_link_libraries(test-csfml-system PRIVATE csfml-system Catch2::Catch2WithM
set_target_warnings(test-csfml-system)
catch_discover_tests(test-csfml-system)
add_executable(test-csfml-window
Window/Joystick.test.cpp
)
target_link_libraries(test-csfml-window PRIVATE csfml-window Catch2::Catch2WithMain)
set_target_warnings(test-csfml-window)
catch_discover_tests(test-csfml-window)
# Copy DLLs into the same directory
if(SFML_OS_WINDOWS AND NOT CSFML_LINK_SFML_STATICALLY)
add_custom_command(TARGET test-csfml-system PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:test-csfml-system> $<TARGET_FILE_DIR:test-csfml-system> COMMAND_EXPAND_LISTS)
add_custom_command(TARGET test-csfml-window PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:test-csfml-window> $<TARGET_FILE_DIR:test-csfml-window> COMMAND_EXPAND_LISTS)
endif()