-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
66 lines (59 loc) · 1.35 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
cmake_minimum_required(VERSION 3.17)
project(ecosim)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "-g -Wall -Werror")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic -lSegFault")
find_package(SFML 2.5 COMPONENTS graphics audio REQUIRED)
set(
SRCS
src/building.h
src/building.cpp
src/chunk.cpp
src/chunk.h
src/chunk_manager.cpp
src/chunk_manager.h
src/constructible.cpp
src/constructible.h
src/delivery.cpp
src/delivery.h
src/entity.cpp
src/entity.h
src/farmhouse.cpp
src/farmhouse.h
src/game.cpp
src/game.h
src/grid.cpp
src/grid.h
src/human.cpp
src/human.h
src/map_generator.cpp
src/map_generator.h
src/random.cpp
src/random.h
src/resources.cpp
src/resources.h
src/resource_manager.cpp
src/resource_manager.h
src/settings.h
src/tile.cpp
src/tile.h
src/ui.cpp
src/ui.h
src/vector_util.cpp
src/vector_util.h
src/world.cpp
src/world.h)
add_executable(ecosim ${SRCS} src/main.cpp)
target_link_libraries(ecosim sfml-graphics sfml-audio)
# Testing with googletest
enable_testing()
include(GoogleTest)
add_executable(
ecosim_tests
${SRCS}
src/delivery_test.cpp
src/game_test.cpp
src/map_generator_test.cpp
src/random_test.cpp)
target_link_libraries(ecosim_tests gtest gtest_main sfml-graphics sfml-audio)
gtest_discover_tests(ecosim_tests WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})