2015-02-26 04:57:28 +01:00
|
|
|
FILE(GLOB TEST_SOURCES
|
|
|
|
"*.cpp"
|
|
|
|
"${CMAKE_SOURCE_DIR}/rwengine/tests/*.cpp")
|
2013-09-11 13:10:42 +02:00
|
|
|
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
|
|
|
|
|
|
|
|
add_executable(run_tests ${TEST_SOURCES})
|
|
|
|
|
|
|
|
include_directories(include)
|
2015-02-26 04:57:28 +01:00
|
|
|
include_directories("${CMAKE_SOURCE_DIR}/tests")
|
2013-09-11 13:10:42 +02:00
|
|
|
|
|
|
|
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
|
|
|
|
|
2014-08-16 00:20:58 +02:00
|
|
|
include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" "${CMAKE_SOURCE_DIR}/rwgame" ${BULLET_INCLUDE_DIR})
|
2013-09-11 13:10:42 +02:00
|
|
|
|
2014-08-17 00:02:34 +02:00
|
|
|
target_link_libraries(run_tests
|
|
|
|
rwengine
|
|
|
|
sfml-window
|
|
|
|
sfml-system
|
|
|
|
sfml-graphics
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
GLEW
|
|
|
|
BulletDynamics
|
|
|
|
BulletCollision
|
|
|
|
LinearMath
|
|
|
|
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
|
2013-09-11 13:10:42 +02:00
|
|
|
|
|
|
|
add_test(UnitTests run_tests)
|