gates_of_skeldal/platform/sdl/tests/CMakeLists.txt
2025-01-26 21:36:03 +01:00

18 lines
No EOL
661 B
CMake

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
set(testFiles sdl_minimal_test.cpp sdl_surface_test.cpp
sdl_mouse.cpp
sdl_update_texture.cpp
)
foreach (testFile ${testFiles})
string(REGEX MATCH "([^\/]+$)" filename ${testFile})
string(REGEX MATCH "[^.]*" executable_name test_${filename})
add_executable(${executable_name} ${testFile})
target_link_libraries(${executable_name} ${SDL2_LIBRARIES} )
add_test(NAME ${executable_name} COMMAND ${executable_name})
endforeach ()
add_executable(sdl_fullscreen_window sdl_fullscreen_window.cpp)
target_link_libraries(sdl_fullscreen_window ${SDL2_LIBRARIES} )