diff --git a/CMakeLists.txt b/CMakeLists.txt index f0493b007..92569e959 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,3 +30,14 @@ if (WIN32) else (WIN32) target_link_libraries (eressea tolua xml2 ncurses lua5.1 pthread) endif (WIN32) + +add_definitions(-DUNITY_BUILD) +set (TESTS_SRCS + ../server/src/tests.c + ../external/cutest/CuTest.c +) +add_executable (tests ${LIB_SRCS} ${TESTS_SRCS}) +if (WIN32) +else (WIN32) + target_link_libraries (tests tolua xml2 ncurses lua5.1 pthread) +endif (WIN32)