-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
72 lines (64 loc) · 1.62 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required (VERSION 2.9)
project (lorminator_dash)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
enable_testing()
include_directories(
include/
test/unit-tests/Catch2/single_include/catch2
test/unit-tests/trompeloeil/include
${SDL2_INCLUDE_DIR}
${SDL2_IMAGE_INCLUDE_DIRS}
)
add_executable(lorminator_dash
src/gui/io.cc
src/gui/resource-store.cc
src/animator.cc
src/behavior.cc
src/entity.cc
src/entity-properties.cc
src/game.cc
src/level.cc
src/level-animator.cc
src/lightning.cc
src/main.cc
src/observer.cc
src/utils.cc
)
set_target_properties(lorminator_dash PROPERTIES
CXX_STANDARD 17
CXX_EXTENSIONS OFF)
target_link_libraries(lorminator_dash
${SDL2_LIBRARY}
${SDL2_IMAGE_LIBRARIES}
)
add_executable(ut
src/animator.cc
src/behavior.cc
src/entity.cc
src/entity-properties.cc
src/game.cc
src/level.cc
src/level-animator.cc
src/lightning.cc
src/observer.cc
src/utils.cc
test/unit-tests/mock-input.cc
test/unit-tests/mock-io.cc
test/unit-tests/mock-resource-store.cc
test/unit-tests/tests-main.cc
test/unit-tests/tests-behavior.cc
test/unit-tests/tests-entity.cc
test/unit-tests/tests-game.cc
test/unit-tests/tests-level.cc
test/unit-tests/tests-lightning.cc
test/unit-tests/tests-observer.cc
test/unit-tests/tests-player.cc
)
set_target_properties(ut PROPERTIES
CXX_STANDARD 17
CXX_EXTENSIONS OFF)
add_test(NAME unittest
COMMAND kcov --include-pattern=lorminator_dash --exclude-pattern=Catch2,trompeloeil --configure=lldb-use-raw-breakpoint-writes=1 kcov-output ./ut
)