diff options
Diffstat (limited to 'Tests/FindSDL/Test/CMakeLists.txt')
-rw-r--r-- | Tests/FindSDL/Test/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/FindSDL/Test/CMakeLists.txt b/Tests/FindSDL/Test/CMakeLists.txt new file mode 100644 index 0000000000..61d4f4b334 --- /dev/null +++ b/Tests/FindSDL/Test/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.1) +project(TestFindSDL C) +include(CTest) + +find_package(SDL) + +add_definitions( + -DCMAKE_EXPECTED_SDL_VERSION_MAJOR=${SDL_VERSION_MAJOR} + -DCMAKE_EXPECTED_SDL_VERSION_MINOR=${SDL_VERSION_MINOR} + -DCMAKE_EXPECTED_SDL_VERSION_PATCH=${SDL_VERSION_PATCH}) + +add_executable(test_sdl_tgt main.c) +target_link_libraries(test_sdl_tgt SDL::SDL) +add_test(NAME test_sdl_tgt COMMAND test_sdl_tgt) + +add_executable(test_sdl_var main.c) +target_include_directories(test_sdl_var PRIVATE ${SDL_INCLUDE_DIRS}) +target_link_libraries(test_sdl_var PRIVATE ${SDL_LIBRARIES}) +add_test(NAME test_sdl_var COMMAND test_sdl_var) |