forked from ndvazquez/TDP1-Portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
208 lines (187 loc) · 7.25 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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
cmake_minimum_required(VERSION 3.14)
project(Portal)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS -pthread)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR})
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_mixer REQUIRED)
include_directories(${SDL2_IMAGE_INCLUDE_DIRS})
include_directories(${SDL2_INCLUDE_DIR})
include_directories(${SDL2_MIXER_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/client)
include_directories(${PROJECT_SOURCE_DIR}/server)
include_directories(${PROJECT_SOURCE_DIR}/tests)
set(CLIENT_SOURCE_FILES
common/Window.cpp
common/Sprite.cpp
common/AnimatedSprite.cpp
common/SDLSession.cpp
client/views/StageView.cpp
client/views/ChellView.cpp
client/views/EnergyBallView.cpp
client/views/AcidView.cpp
client/views/BulletView.cpp
client/views/View.cpp
client/views/RockView.cpp
client/views/ButtonView.cpp
client/views/BluePortalView.cpp
client/views/Camera.cpp
client/audio/AudioSystem.cpp
client/audio/SoundCodeQueue.cpp
client/views/ViewFactory.cpp
client/views/ViewManager.cpp
client/views/CakeView.cpp
common/UserEvent.cpp
client/communication-support/UserEventHandler.cpp
common/UserEventQueue.cpp
client/views/OrangePortalView.cpp
client/views/GateView.cpp
common/Thread.cpp
common/Socket.cpp
client/communication-support/EventSender.cpp
client/communication-support/StageStatusReceiver.cpp
common/StageStatusQueue.cpp
common/Protocol.cpp
client/Game.cpp
client/Drawer.cpp
client/views/EnergyBarView.cpp
client/InitialMenu.cpp
common/OutputText.cpp
common/InputText.cpp
client/LevelMenu.cpp
client/GameNameMenu.cpp
client/SimpleInputManager.cpp
client/views/ReceptorUpView.cpp
client/views/ReceptorDownView.cpp
client/views/ReceptorLeftView.cpp
client/views/ReceptorRightView.cpp
client/views/Pintool.cpp)
#EDITOR CONFIG
set(EDITOR_SOURCE_FILES
common/Window.cpp
common/Sprite.cpp
common/AnimatedSprite.cpp
common/SDLSession.cpp
common/OutputText.cpp
common/InputText.cpp
editor/Menu.cpp
editor/Editor.cpp
editor/MenuButton.cpp
editor/Event.cpp
editor/MouseButton.cpp
editor/HomeScreen.cpp
editor/stage/Controller.cpp
editor/stage/View.cpp
editor/stage/Stage.cpp
editor/stage/LogicGates.cpp
editor/stage/YamlManager.cpp
editor/stage/object/StaticObject.cpp
editor/stage/object/Block.cpp
editor/stage/object/Button.cpp
editor/stage/object/Rock.cpp
editor/stage/object/Chell.cpp
editor/stage/object/AnimatedObject.cpp
editor/stage/object/Object.cpp
editor/stage/object/Gate.cpp
editor/stage/object/Cake.cpp
editor/stage/object/Acid.cpp
editor/stage/object/Receptor.cpp
editor/stage/object/EnergyBar.cpp
editor/stage/object/VerticalEnergyBar.cpp
editor/stage/object/HorizontalEnergyBar.cpp
editor/stage/object/diagonalBlocks/DiagonalBlockUp.cpp
editor/stage/object/diagonalBlocks/DiagonalBlockRightUp.cpp
editor/stage/object/diagonalBlocks/DiagonalBlockLeftUp.cpp
editor/stage/object/diagonalBlocks/DiagonalBlockDown.cpp
editor/stage/object/diagonalBlocks/DiagonalBlockLeftDown.cpp
editor/stage/object/diagonalBlocks/DiagonalBlockRightDown.cpp
editor/stage/object/WithOutGravitySentinel.cpp
editor/stage/object/GravitySentinel.cpp
#ffmpeg/CodecContext.cpp
#ffmpeg/FormatOutput.cpp
#ffmpeg/FormatContext.cpp
#ffmpeg/Frame.cpp
#ffmpeg/Output.cpp
#ffmpeg/Packet.cpp
#ffmpeg/SwsContext.cpp
#ffmpeg/BlockingQueue.cpp
#ffmpeg/Consumer.cpp
#ffmpeg/Thread.cpp
editor/stage/InputManager.cpp client/CloseException.h)
set(SERVER_SOURCE_FILES
server/stage-support/Stage.cpp
server/stage-support/Coordinate.cpp
server/entities/RockBlock.cpp
server/entities/RockBlock.cpp
server/entities/MetalBlock.cpp
server/entities/DiagonalMetalBlock.cpp
server/entities/EnergyTransmitter.cpp
server/entities/Rock.cpp
server/entities/EnergyBar.cpp
server/entities/Button.cpp
server/entities/Acid.cpp
server/entities/Chell.cpp
server/movements/Dynamic.cpp
server/movements/MoveRight.cpp
server/movements/MoveLeft.cpp
server/movements/Stop.cpp
server/entities/EnergyBall.cpp
server/entities/Entity.cpp
server/entities/Floor.cpp
server/entities/BlueShot.cpp
server/entities/OrangeShot.cpp
server/entities/Shot.cpp
server/entities/Portal.cpp
server/entities/EnergyTransmitterUp.cpp
server/entities/EnergyTransmitterDown.cpp
server/entities/EnergyTransmitterLeft.cpp
server/entities/EnergyTransmitterRight.cpp
server/entities/Gate.cpp
server/entities/Cake.cpp
server/communication-support/StageManager.cpp
common/Thread.cpp
common/Socket.cpp
common/StageStatusQueue.cpp
common/UserEventQueue.cpp
common/UserEvent.cpp
server/communication-support/ClientHandler.cpp
server/communication-support/ClientSender.cpp
server/communication-support/ClientReceiver.cpp
server/entities/EnergyReceptor.cpp
server/entities/EnergyReceptorUp.cpp
server/entities/EnergyReceptorDown.cpp
server/entities/EnergyReceptorLeft.cpp
server/entities/EnergyReceptorRight.cpp
server/stage-support/PhysicsWorld.cpp
server/entities/ItemActivable.cpp
server/portal-support/PortalManager.cpp
server/stage-support/YamlParser.cpp
server/portal-support/PortalHolder.cpp
common/Protocol.cpp
server/config/configuration.cpp
server/communication-support/RoomManager.cpp
server/communication-support/RoomAcceptor.cpp
server/communication-support/RoomWorker.cpp
server/communication-support/Server.cpp
server/entities/PinTool.cpp)
set(TEST_SOURCE_FILES
tests/tests.cpp)
add_executable(Client client/main.cpp ${CLIENT_SOURCE_FILES})
add_executable(Server server/main.cpp ${SERVER_SOURCE_FILES})
add_executable(Test ${TEST_SOURCE_FILES} ${SERVER_SOURCE_FILES})
add_executable(Editor editor/main.cpp ${EDITOR_SOURCE_FILES})
add_subdirectory(Box2D)
target_link_libraries(Client yaml-cpp ${SDL2_LIBRARY}
${SDL2_IMAGE_LIBRARIES} ${SDL2_MIXER_LIBRARIES}
${SDL2_TTF_LIBRARIES} -lSDL2_ttf pthread)
target_link_libraries(Editor yaml-cpp ${SDL2_LIBRARY}
${SDL2_IMAGE_LIBRARIES} ${SDL2_MIXER_LIBRARIES}
${SDL2_TTF_LIBRARIES} -lSDL2_ttf)# avformat avcodec avutil swscale)
target_link_libraries(Server yaml-cpp)
target_link_libraries(Test yaml-cpp)
target_compile_features(Server PUBLIC cxx_std_17)
target_compile_features(Test PUBLIC cxx_std_17)
target_link_libraries(Server TG::Box2D pthread)
target_link_libraries(Test TG::Box2D)