-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
140 lines (126 loc) · 3.25 KB
/
CMakeLists.txt
File metadata and controls
140 lines (126 loc) · 3.25 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
cmake_minimum_required(VERSION 3.21)
project(Zelda C CXX)
include(Functions.cmake)
include(FetchContent)
enable_testing()
# Add yaml-cpp
set(YAML_CPP_BUILD_TESTS OFF)
FetchContent_Declare(
yaml-cpp
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
GIT_TAG master
)
FetchContent_MakeAvailable(yaml-cpp)
# Add googletest dependency
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG main
)
FetchContent_MakeAvailable(googletest)
# Add SFML dependency
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
FetchContent_Declare(SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG master
)
FetchContent_MakeAvailable(SFML)
# Configure project
set(ZeldaIncludes
${SFML_SOURCE_DIR}/include
${yaml-cpp_SOURCE_DIR}/include
src
)
add_library(ZeldaLibrary STATIC
src/Core/SpriteAnimation.h
src/Core/SpriteAnimation.cpp
src/Core/ResourceManager/ResourceManager.h
src/Core/ResourceManager/ResourceManager.inl
src/Core/ResourceManager/ResourceManagerUtils.h
src/Core/ResourceManager/ResourceManagerUtils.cpp
src/Core/ResourceManager/ResourceManager.cpp
src/Core/ResourceManager/TextureManager.h
src/Core/ResourceManager/GUIStyleManager.h
src/Core/ResourceManager/FontManager.h
src/Core/ResourceManager/AnimationManager.h
src/Core/Animation/Animation.h
src/Core/Animation/Animation.cpp
src/Core/Animation/AnimationSequence.h
src/Core/Animation/AnimationSequence.cpp
src/Core/Animation/TextureAnimationSequence.h
src/Core/Animation/TextureAnimationSequence.cpp
src/Core/Serializable.h
src/Core/Base.h
src/Core/OstreamOverloads.h
src/Core/Debug.h
src/Core/Debug.cpp
src/Core/Group.h
src/Core/Group.cpp
src/Core/GroupManager.h
src/Core/GroupManager.cpp
src/Core/Sprite.h
src/Core/Sprite.cpp
src/Core/Toggles.h
src/Core/Toggles.cpp
src/Core/RectUtils.h
src/Core/RectUtils.cpp
src/Core/Layer.h
src/Core/LayerStack.h
src/Core/LayerStack.cpp
src/Core/Application.h
src/Core/Application.cpp
src/Core/GameObject.h
src/Core/GameObject.cpp
src/Core/GuiStyle.h
src/Core/GuiStyle.cpp
src/Core/UI/InflatableTextBox.h
src/Core/UI/InflatableTextBox.cpp
src/Core/UI/TextureOverlay.h
src/Core/UI/TextureOverlay.cpp
src/Core/UI/Bar.h
src/Core/UI/Bar.cpp
src/Core/Iterator.h
src/ParticleFactory.h
src/ParticleFactory.cpp
src/Entity.h
src/Entity.cpp
src/Enemy.h
src/Enemy.cpp
src/Weapon.h
src/Weapon.cpp
src/Support.h
src/Support.cpp
src/Game.h
src/Game.cpp
src/UI.h
src/UI.cpp
src/Settings.h
src/Settings.cpp
src/Level.h
src/Level.cpp
src/LevelView.h
src/LevelView.cpp
src/Player.h
src/Player.cpp
src/Tile.h
src/Tile.cpp
src/Particles.h
src/Particles.cpp
)
target_link_libraries(ZeldaLibrary PUBLIC
sfml-system
sfml-window
sfml-graphics
sfml-audio
sfml-network
yaml-cpp
)
target_include_directories(ZeldaLibrary PUBLIC
${ZeldaIncludes}
)
set_debug_build_target(ZeldaLibrary)
add_executable(Zelda
bootstrap/Main.cpp
)
target_link_libraries(Zelda PRIVATE ZeldaLibrary)
add_subdirectory(tests)