forked from bvschaik/julius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
364 lines (349 loc) · 14.6 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
cmake_minimum_required(VERSION 2.6)
project(julius C)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake/")
if (CMAKE_VERSION VERSION_LESS 3.1)
if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
endif()
else()
set(CMAKE_C_STANDARD 99)
endif()
if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=implicit-function-declaration")
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 5.0)
set(CMAKE_C_FLAGS "-Werror=incompatible-pointer-types -Werror=int-conversion -Wstrict-prototypes ${CMAKE_C_FLAGS}")
endif()
endif()
set(SMK_FILES
ext/libsmacker/smacker.c
ext/libsmacker/smk_bitstream.c
ext/libsmacker/smk_hufftree.c
)
set(PLATFORM_FILES
${PROJECT_SOURCE_DIR}/src/platform/julius.c
${PROJECT_SOURCE_DIR}/src/platform/cursor.c
${PROJECT_SOURCE_DIR}/src/platform/keyboard_input.c
${PROJECT_SOURCE_DIR}/src/platform/log.c
${PROJECT_SOURCE_DIR}/src/platform/screen.c
${PROJECT_SOURCE_DIR}/src/platform/sound_device.c
)
set(CORE_FILES
${PROJECT_SOURCE_DIR}/src/core/buffer.c
${PROJECT_SOURCE_DIR}/src/core/calc.c
${PROJECT_SOURCE_DIR}/src/core/dir.c
${PROJECT_SOURCE_DIR}/src/core/file.c
${PROJECT_SOURCE_DIR}/src/core/image.c
${PROJECT_SOURCE_DIR}/src/core/io.c
${PROJECT_SOURCE_DIR}/src/core/lang.c
${PROJECT_SOURCE_DIR}/src/core/random.c
${PROJECT_SOURCE_DIR}/src/core/string.c
${PROJECT_SOURCE_DIR}/src/core/time.c
${PROJECT_SOURCE_DIR}/src/core/zip.c
)
set(BUILDING_FILES
${PROJECT_SOURCE_DIR}/src/building/animation.c
${PROJECT_SOURCE_DIR}/src/building/barracks.c
${PROJECT_SOURCE_DIR}/src/building/building.c
${PROJECT_SOURCE_DIR}/src/building/building_state.c
${PROJECT_SOURCE_DIR}/src/building/construction.c
${PROJECT_SOURCE_DIR}/src/building/construction_building.c
${PROJECT_SOURCE_DIR}/src/building/construction_clear.c
${PROJECT_SOURCE_DIR}/src/building/construction_warning.c
${PROJECT_SOURCE_DIR}/src/building/count.c
${PROJECT_SOURCE_DIR}/src/building/destruction.c
${PROJECT_SOURCE_DIR}/src/building/dock.c
${PROJECT_SOURCE_DIR}/src/building/figure.c
${PROJECT_SOURCE_DIR}/src/building/government.c
${PROJECT_SOURCE_DIR}/src/building/granary.c
${PROJECT_SOURCE_DIR}/src/building/house.c
${PROJECT_SOURCE_DIR}/src/building/house_evolution.c
${PROJECT_SOURCE_DIR}/src/building/house_population.c
${PROJECT_SOURCE_DIR}/src/building/house_service.c
${PROJECT_SOURCE_DIR}/src/building/industry.c
${PROJECT_SOURCE_DIR}/src/building/list.c
${PROJECT_SOURCE_DIR}/src/building/maintenance.c
${PROJECT_SOURCE_DIR}/src/building/market.c
${PROJECT_SOURCE_DIR}/src/building/menu.c
${PROJECT_SOURCE_DIR}/src/building/model.c
${PROJECT_SOURCE_DIR}/src/building/properties.c
${PROJECT_SOURCE_DIR}/src/building/storage.c
${PROJECT_SOURCE_DIR}/src/building/warehouse.c
)
set(CITY_FILES
${PROJECT_SOURCE_DIR}/src/city/buildings.c
${PROJECT_SOURCE_DIR}/src/city/culture.c
${PROJECT_SOURCE_DIR}/src/city/data.c
${PROJECT_SOURCE_DIR}/src/city/data_private.c
${PROJECT_SOURCE_DIR}/src/city/emperor.c
${PROJECT_SOURCE_DIR}/src/city/entertainment.c
${PROJECT_SOURCE_DIR}/src/city/festival.c
${PROJECT_SOURCE_DIR}/src/city/figures.c
${PROJECT_SOURCE_DIR}/src/city/finance.c
${PROJECT_SOURCE_DIR}/src/city/gods.c
${PROJECT_SOURCE_DIR}/src/city/health.c
${PROJECT_SOURCE_DIR}/src/city/houses.c
${PROJECT_SOURCE_DIR}/src/city/labor.c
${PROJECT_SOURCE_DIR}/src/city/map.c
${PROJECT_SOURCE_DIR}/src/city/message.c
${PROJECT_SOURCE_DIR}/src/city/migration.c
${PROJECT_SOURCE_DIR}/src/city/military.c
${PROJECT_SOURCE_DIR}/src/city/mission.c
${PROJECT_SOURCE_DIR}/src/city/population.c
${PROJECT_SOURCE_DIR}/src/city/ratings.c
${PROJECT_SOURCE_DIR}/src/city/resource.c
${PROJECT_SOURCE_DIR}/src/city/sentiment.c
${PROJECT_SOURCE_DIR}/src/city/sound.c
${PROJECT_SOURCE_DIR}/src/city/trade.c
${PROJECT_SOURCE_DIR}/src/city/victory.c
${PROJECT_SOURCE_DIR}/src/city/view.c
${PROJECT_SOURCE_DIR}/src/city/warning.c
)
set(EMPIRE_FILES
${PROJECT_SOURCE_DIR}/src/empire/city.c
${PROJECT_SOURCE_DIR}/src/empire/empire.c
${PROJECT_SOURCE_DIR}/src/empire/object.c
${PROJECT_SOURCE_DIR}/src/empire/trade_prices.c
${PROJECT_SOURCE_DIR}/src/empire/trade_route.c
)
set(FIGURE_FILES
${PROJECT_SOURCE_DIR}/src/figure/action.c
${PROJECT_SOURCE_DIR}/src/figure/combat.c
${PROJECT_SOURCE_DIR}/src/figure/enemy_army.c
${PROJECT_SOURCE_DIR}/src/figure/figure.c
${PROJECT_SOURCE_DIR}/src/figure/formation.c
${PROJECT_SOURCE_DIR}/src/figure/formation_enemy.c
${PROJECT_SOURCE_DIR}/src/figure/formation_herd.c
${PROJECT_SOURCE_DIR}/src/figure/formation_layout.c
${PROJECT_SOURCE_DIR}/src/figure/formation_legion.c
${PROJECT_SOURCE_DIR}/src/figure/image.c
${PROJECT_SOURCE_DIR}/src/figure/movement.c
${PROJECT_SOURCE_DIR}/src/figure/name.c
${PROJECT_SOURCE_DIR}/src/figure/phrase.c
${PROJECT_SOURCE_DIR}/src/figure/properties.c
${PROJECT_SOURCE_DIR}/src/figure/route.c
${PROJECT_SOURCE_DIR}/src/figure/service.c
${PROJECT_SOURCE_DIR}/src/figure/sound.c
${PROJECT_SOURCE_DIR}/src/figure/trader.c
)
set(FIGURETYPE_FILES
${PROJECT_SOURCE_DIR}/src/figuretype/animal.c
${PROJECT_SOURCE_DIR}/src/figuretype/cartpusher.c
${PROJECT_SOURCE_DIR}/src/figuretype/crime.c
${PROJECT_SOURCE_DIR}/src/figuretype/docker.c
${PROJECT_SOURCE_DIR}/src/figuretype/enemy.c
${PROJECT_SOURCE_DIR}/src/figuretype/entertainer.c
${PROJECT_SOURCE_DIR}/src/figuretype/maintenance.c
${PROJECT_SOURCE_DIR}/src/figuretype/market.c
${PROJECT_SOURCE_DIR}/src/figuretype/migrant.c
${PROJECT_SOURCE_DIR}/src/figuretype/missile.c
${PROJECT_SOURCE_DIR}/src/figuretype/native.c
${PROJECT_SOURCE_DIR}/src/figuretype/service.c
${PROJECT_SOURCE_DIR}/src/figuretype/soldier.c
${PROJECT_SOURCE_DIR}/src/figuretype/trader.c
${PROJECT_SOURCE_DIR}/src/figuretype/wall.c
${PROJECT_SOURCE_DIR}/src/figuretype/water.c
)
set(GAME_FILES
${PROJECT_SOURCE_DIR}/src/game/animation.c
${PROJECT_SOURCE_DIR}/src/game/difficulty.c
${PROJECT_SOURCE_DIR}/src/game/file.c
${PROJECT_SOURCE_DIR}/src/game/file_io.c
${PROJECT_SOURCE_DIR}/src/game/game.c
${PROJECT_SOURCE_DIR}/src/game/mission.c
${PROJECT_SOURCE_DIR}/src/game/orientation.c
${PROJECT_SOURCE_DIR}/src/game/resource.c
${PROJECT_SOURCE_DIR}/src/game/settings.c
${PROJECT_SOURCE_DIR}/src/game/state.c
${PROJECT_SOURCE_DIR}/src/game/tick.c
${PROJECT_SOURCE_DIR}/src/game/time.c
${PROJECT_SOURCE_DIR}/src/game/tutorial.c
${PROJECT_SOURCE_DIR}/src/game/undo.c
)
set(INPUT_FILES
${PROJECT_SOURCE_DIR}/src/input/cursor.c
${PROJECT_SOURCE_DIR}/src/input/hotkey.c
${PROJECT_SOURCE_DIR}/src/input/keyboard.c
${PROJECT_SOURCE_DIR}/src/input/mouse.c
${PROJECT_SOURCE_DIR}/src/input/scroll.c
)
set(MAP_FILES
${PROJECT_SOURCE_DIR}/src/map/aqueduct.c
${PROJECT_SOURCE_DIR}/src/map/bookmark.c
${PROJECT_SOURCE_DIR}/src/map/bridge.c
${PROJECT_SOURCE_DIR}/src/map/building.c
${PROJECT_SOURCE_DIR}/src/map/building_tiles.c
${PROJECT_SOURCE_DIR}/src/map/desirability.c
${PROJECT_SOURCE_DIR}/src/map/elevation.c
${PROJECT_SOURCE_DIR}/src/map/figure.c
${PROJECT_SOURCE_DIR}/src/map/grid.c
${PROJECT_SOURCE_DIR}/src/map/image.c
${PROJECT_SOURCE_DIR}/src/map/image_context.c
${PROJECT_SOURCE_DIR}/src/map/natives.c
${PROJECT_SOURCE_DIR}/src/map/orientation.c
${PROJECT_SOURCE_DIR}/src/map/property.c
${PROJECT_SOURCE_DIR}/src/map/random.c
${PROJECT_SOURCE_DIR}/src/map/ring.c
${PROJECT_SOURCE_DIR}/src/map/road_access.c
${PROJECT_SOURCE_DIR}/src/map/road_aqueduct.c
${PROJECT_SOURCE_DIR}/src/map/road_network.c
${PROJECT_SOURCE_DIR}/src/map/routing.c
${PROJECT_SOURCE_DIR}/src/map/routing_data.c
${PROJECT_SOURCE_DIR}/src/map/routing_path.c
${PROJECT_SOURCE_DIR}/src/map/routing_terrain.c
${PROJECT_SOURCE_DIR}/src/map/soldier_strength.c
${PROJECT_SOURCE_DIR}/src/map/sprite.c
${PROJECT_SOURCE_DIR}/src/map/terrain.c
${PROJECT_SOURCE_DIR}/src/map/tiles.c
${PROJECT_SOURCE_DIR}/src/map/water.c
${PROJECT_SOURCE_DIR}/src/map/water_supply.c
)
set(SCENARIO_FILES
${PROJECT_SOURCE_DIR}/src/scenario/building.c
${PROJECT_SOURCE_DIR}/src/scenario/criteria.c
${PROJECT_SOURCE_DIR}/src/scenario/demand_change.c
${PROJECT_SOURCE_DIR}/src/scenario/distant_battle.c
${PROJECT_SOURCE_DIR}/src/scenario/earthquake.c
${PROJECT_SOURCE_DIR}/src/scenario/emperor_change.c
${PROJECT_SOURCE_DIR}/src/scenario/empire.c
${PROJECT_SOURCE_DIR}/src/scenario/gladiator_revolt.c
${PROJECT_SOURCE_DIR}/src/scenario/invasion.c
${PROJECT_SOURCE_DIR}/src/scenario/map.c
${PROJECT_SOURCE_DIR}/src/scenario/price_change.c
${PROJECT_SOURCE_DIR}/src/scenario/property.c
${PROJECT_SOURCE_DIR}/src/scenario/random_event.c
${PROJECT_SOURCE_DIR}/src/scenario/request.c
${PROJECT_SOURCE_DIR}/src/scenario/scenario.c
)
set(GRAPHICS_FILES
${PROJECT_SOURCE_DIR}/src/graphics/arrow_button.c
${PROJECT_SOURCE_DIR}/src/graphics/button.c
${PROJECT_SOURCE_DIR}/src/graphics/font.c
${PROJECT_SOURCE_DIR}/src/graphics/generic_button.c
${PROJECT_SOURCE_DIR}/src/graphics/graphics.c
${PROJECT_SOURCE_DIR}/src/graphics/image.c
${PROJECT_SOURCE_DIR}/src/graphics/image_button.c
${PROJECT_SOURCE_DIR}/src/graphics/lang_text.c
${PROJECT_SOURCE_DIR}/src/graphics/menu.c
${PROJECT_SOURCE_DIR}/src/graphics/panel.c
${PROJECT_SOURCE_DIR}/src/graphics/rich_text.c
${PROJECT_SOURCE_DIR}/src/graphics/screen.c
${PROJECT_SOURCE_DIR}/src/graphics/screenshot.c
${PROJECT_SOURCE_DIR}/src/graphics/text.c
${PROJECT_SOURCE_DIR}/src/graphics/tooltip.c
${PROJECT_SOURCE_DIR}/src/graphics/video.c
${PROJECT_SOURCE_DIR}/src/graphics/warning.c
${PROJECT_SOURCE_DIR}/src/graphics/window.c
)
set(SOUND_FILES
${PROJECT_SOURCE_DIR}/src/sound/city.c
${PROJECT_SOURCE_DIR}/src/sound/effect.c
${PROJECT_SOURCE_DIR}/src/sound/music.c
${PROJECT_SOURCE_DIR}/src/sound/speech.c
${PROJECT_SOURCE_DIR}/src/sound/system.c
)
set(WIDGET_FILES
${PROJECT_SOURCE_DIR}/src/widget/city.c
${PROJECT_SOURCE_DIR}/src/widget/city_bridge.c
${PROJECT_SOURCE_DIR}/src/widget/city_building_ghost.c
${PROJECT_SOURCE_DIR}/src/widget/city_figure.c
${PROJECT_SOURCE_DIR}/src/widget/city_overlay_education.c
${PROJECT_SOURCE_DIR}/src/widget/city_overlay_entertainment.c
${PROJECT_SOURCE_DIR}/src/widget/city_overlay_health.c
${PROJECT_SOURCE_DIR}/src/widget/city_overlay_other.c
${PROJECT_SOURCE_DIR}/src/widget/city_overlay_risks.c
${PROJECT_SOURCE_DIR}/src/widget/city_with_overlay.c
${PROJECT_SOURCE_DIR}/src/widget/city_without_overlay.c
${PROJECT_SOURCE_DIR}/src/widget/minimap.c
${PROJECT_SOURCE_DIR}/src/widget/sidebar.c
${PROJECT_SOURCE_DIR}/src/widget/top_menu.c
)
set(WINDOW_FILES
${PROJECT_SOURCE_DIR}/src/window/advisors.c
${PROJECT_SOURCE_DIR}/src/window/advisor/chief.c
${PROJECT_SOURCE_DIR}/src/window/advisor/education.c
${PROJECT_SOURCE_DIR}/src/window/advisor/entertainment.c
${PROJECT_SOURCE_DIR}/src/window/advisor/financial.c
${PROJECT_SOURCE_DIR}/src/window/advisor/health.c
${PROJECT_SOURCE_DIR}/src/window/advisor/imperial.c
${PROJECT_SOURCE_DIR}/src/window/advisor/labor.c
${PROJECT_SOURCE_DIR}/src/window/advisor/military.c
${PROJECT_SOURCE_DIR}/src/window/advisor/population.c
${PROJECT_SOURCE_DIR}/src/window/advisor/ratings.c
${PROJECT_SOURCE_DIR}/src/window/advisor/religion.c
${PROJECT_SOURCE_DIR}/src/window/advisor/trade.c
${PROJECT_SOURCE_DIR}/src/window/build_menu.c
${PROJECT_SOURCE_DIR}/src/window/building_info.c
${PROJECT_SOURCE_DIR}/src/window/building/common.c
${PROJECT_SOURCE_DIR}/src/window/building/culture.c
${PROJECT_SOURCE_DIR}/src/window/building/distribution.c
${PROJECT_SOURCE_DIR}/src/window/building/figures.c
${PROJECT_SOURCE_DIR}/src/window/building/government.c
${PROJECT_SOURCE_DIR}/src/window/building/house.c
${PROJECT_SOURCE_DIR}/src/window/building/industry.c
${PROJECT_SOURCE_DIR}/src/window/building/military.c
${PROJECT_SOURCE_DIR}/src/window/building/terrain.c
${PROJECT_SOURCE_DIR}/src/window/building/utility.c
${PROJECT_SOURCE_DIR}/src/window/cck_selection.c
${PROJECT_SOURCE_DIR}/src/window/city.c
${PROJECT_SOURCE_DIR}/src/window/difficulty_options.c
${PROJECT_SOURCE_DIR}/src/window/display_options.c
${PROJECT_SOURCE_DIR}/src/window/donate_to_city.c
${PROJECT_SOURCE_DIR}/src/window/empire.c
${PROJECT_SOURCE_DIR}/src/window/file_dialog.c
${PROJECT_SOURCE_DIR}/src/window/gift_to_emperor.c
${PROJECT_SOURCE_DIR}/src/window/hold_festival.c
${PROJECT_SOURCE_DIR}/src/window/intermezzo.c
${PROJECT_SOURCE_DIR}/src/window/labor_priority.c
${PROJECT_SOURCE_DIR}/src/window/logo.c
${PROJECT_SOURCE_DIR}/src/window/main_menu.c
${PROJECT_SOURCE_DIR}/src/window/message_dialog.c
${PROJECT_SOURCE_DIR}/src/window/message_list.c
${PROJECT_SOURCE_DIR}/src/window/mission_briefing.c
${PROJECT_SOURCE_DIR}/src/window/mission_end.c
${PROJECT_SOURCE_DIR}/src/window/mission_selection.c
${PROJECT_SOURCE_DIR}/src/window/new_career.c
${PROJECT_SOURCE_DIR}/src/window/overlay_menu.c
${PROJECT_SOURCE_DIR}/src/window/popup_dialog.c
${PROJECT_SOURCE_DIR}/src/window/resource_settings.c
${PROJECT_SOURCE_DIR}/src/window/set_salary.c
${PROJECT_SOURCE_DIR}/src/window/sound_options.c
${PROJECT_SOURCE_DIR}/src/window/speed_options.c
${PROJECT_SOURCE_DIR}/src/window/trade_opened.c
${PROJECT_SOURCE_DIR}/src/window/trade_prices.c
${PROJECT_SOURCE_DIR}/src/window/victory_dialog.c
${PROJECT_SOURCE_DIR}/src/window/victory_video.c
)
add_executable(julius
WIN32
${PLATFORM_FILES}
${CORE_FILES}
${BUILDING_FILES}
${CITY_FILES}
${EMPIRE_FILES}
${FIGURE_FILES}
${FIGURETYPE_FILES}
${GAME_FILES}
${INPUT_FILES}
${MAP_FILES}
${SCENARIO_FILES}
${GRAPHICS_FILES}
${SOUND_FILES}
${WIDGET_FILES}
${WINDOW_FILES}
${SMK_FILES}
${PROJECT_SOURCE_DIR}/res/julius.rc
)
find_package(SDL2 REQUIRED)
find_package(SDL2_mixer REQUIRED)
include_directories(${SDL2_INCLUDE_DIR})
include_directories(${SDL2_MIXER_INCLUDE_DIR})
include_directories(ext)
include_directories(src)
if(MSVC)
include_directories(ext/dirent)
endif()
target_link_libraries (julius ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY})
install(TARGETS julius RUNTIME DESTINATION bin)
# Unit tests
enable_testing()
add_subdirectory(test)