2016-04-15 02:06:10 +02:00
|
|
|
set(TEST_SOURCES
|
|
|
|
"main.cpp"
|
|
|
|
"test_animation.cpp"
|
|
|
|
"test_archive.cpp"
|
|
|
|
"test_buoyancy.cpp"
|
|
|
|
"test_character.cpp"
|
|
|
|
"test_chase.cpp"
|
|
|
|
"test_cutscene.cpp"
|
|
|
|
"test_data.cpp"
|
|
|
|
"test_FileIndex.cpp"
|
|
|
|
"test_GameData.cpp"
|
|
|
|
"test_GameWorld.cpp"
|
|
|
|
"test_globals.hpp"
|
|
|
|
"test_items.cpp"
|
|
|
|
"test_lifetime.cpp"
|
|
|
|
"test_loaderdff.cpp"
|
|
|
|
"test_Logger.cpp"
|
|
|
|
"test_menu.cpp"
|
|
|
|
"test_object.cpp"
|
|
|
|
"test_object_data.cpp"
|
|
|
|
"test_pickup.cpp"
|
|
|
|
"test_renderer.cpp"
|
|
|
|
"test_Resource.cpp"
|
|
|
|
"test_rwbstream.cpp"
|
|
|
|
"test_SaveGame.cpp"
|
|
|
|
"test_scriptmachine.cpp"
|
|
|
|
"test_skeleton.cpp"
|
|
|
|
"test_state.cpp"
|
|
|
|
"test_text.cpp"
|
|
|
|
"test_trafficdirector.cpp"
|
|
|
|
"test_vehicle.cpp"
|
|
|
|
"test_VisualFX.cpp"
|
|
|
|
"test_weapon.cpp"
|
|
|
|
"test_worker.cpp"
|
|
|
|
"test_world.cpp"
|
|
|
|
)
|
2013-09-11 13:10:42 +02:00
|
|
|
|
2016-04-15 02:06:10 +02:00
|
|
|
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
|
|
|
|
|
|
|
|
add_executable(run_tests ${TEST_SOURCES})
|
2013-09-11 13:10:42 +02:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2016-05-07 19:29:08 +02:00
|
|
|
include_directories("${CMAKE_SOURCE_DIR}/rwengine/include" "${CMAKE_SOURCE_DIR}/rwgame")
|
|
|
|
include_directories(${BULLET_INCLUDE_DIR} SYSTEM)
|
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}
|
|
|
|
BulletDynamics
|
|
|
|
BulletCollision
|
|
|
|
LinearMath
|
|
|
|
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
|
2013-09-11 13:10:42 +02:00
|
|
|
|
|
|
|
add_test(UnitTests run_tests)
|