Made the source tree a little nicer, added some info for Fedora users.
[umd.git] / tests / CMakeLists.txt
blobd1cfd8feb8d8e784e1027683f5d9ce886561da02
1 set(TEST_NAMES basic)
2 set(TEST_LIBS umds m)
4 find_package(SDL)
6 if(SDL_FOUND)
7         set(TEST_NAMES ${TEST_NAMES} warp move click)
8         set(TEST_LIBS ${TEST_LIBS} ${SDL_LIBRARY})
9         include_directories(${SDL_INCLUDE_DIR})
10 else(SDL_FOUND)
11         message(STATUS "SDL not found, only building basic tests...")
12 endif(SDL_FOUND)
14 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
15 link_directories(${ARCHIVE_OUTPUT_DIRECTORY})
17 foreach(BIN ${TEST_NAMES})
18         add_executable(${BIN} ${BIN}.c)
19         target_link_libraries(${BIN} ${TEST_LIBS})
20         add_test(${BIN} ${EXECUTABLE_OUTPUT_PATH}/${BIN})
21 endforeach(BIN)