-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
117 lines (108 loc) · 3.05 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
cmake_minimum_required(VERSION 3.9.0)
project(doom)
option(EMBED_ASSET_WAD "Embed a WAD at build time as an asset" OFF)
find_package (32BLIT CONFIG REQUIRED PATHS ../32blit-sdk)
set(DOOM_SOURCES
src/chocdoom/dummy.c
src/chocdoom/am_map.c
src/chocdoom/doomdef.c
src/chocdoom/doomstat.c
src/chocdoom/dstrings.c
src/chocdoom/d_event.c
src/chocdoom/d_items.c
src/chocdoom/d_iwad.c
src/chocdoom/d_loop.c
src/chocdoom/d_main.c
src/chocdoom/d_mode.c
src/chocdoom/d_net.c
src/chocdoom/f_finale.c
src/chocdoom/f_wipe.c
src/chocdoom/g_game.c
src/chocdoom/hu_lib.c
src/chocdoom/hu_stuff.c
src/chocdoom/info.c
src/chocdoom/i_cdmus.c
src/chocdoom/i_endoom.c
src/chocdoom/i_joystick.c
src/chocdoom/i_main.c
src/chocdoom/i_oplmusic.c
src/chocdoom/i_scale.c
src/chocdoom/i_sound.c
src/chocdoom/i_system.c
src/chocdoom/i_timer.c
src/chocdoom/i_video.c
src/chocdoom/memio.c
src/chocdoom/midifile.c
src/chocdoom/mus2mid.c
src/chocdoom/m_argv.c
src/chocdoom/m_bbox.c
src/chocdoom/m_cheat.c
src/chocdoom/m_config.c
src/chocdoom/m_controls.c
src/chocdoom/m_fixed.c
src/chocdoom/m_menu.c
src/chocdoom/m_misc.c
src/chocdoom/m_random.c
src/chocdoom/p_ceilng.c
src/chocdoom/p_doors.c
src/chocdoom/p_enemy.c
src/chocdoom/p_floor.c
src/chocdoom/p_inter.c
src/chocdoom/p_lights.c
src/chocdoom/p_map.c
src/chocdoom/p_maputl.c
src/chocdoom/p_mobj.c
src/chocdoom/p_plats.c
src/chocdoom/p_pspr.c
src/chocdoom/p_saveg.c
src/chocdoom/p_setup.c
src/chocdoom/p_sight.c
src/chocdoom/p_spec.c
src/chocdoom/p_switch.c
src/chocdoom/p_telept.c
src/chocdoom/p_tick.c
src/chocdoom/p_user.c
src/chocdoom/r_bsp.c
src/chocdoom/r_data.c
src/chocdoom/r_draw.c
src/chocdoom/r_main.c
src/chocdoom/r_plane.c
src/chocdoom/r_segs.c
src/chocdoom/r_sky.c
src/chocdoom/r_things.c
src/chocdoom/sha1.c
src/chocdoom/sounds.c
src/chocdoom/statdump.c
src/chocdoom/st_lib.c
src/chocdoom/st_stuff.c
src/chocdoom/s_sound.c
src/chocdoom/tables.c
src/chocdoom/v_video.c
src/chocdoom/wi_stuff.c
src/chocdoom/w_checksum.c
src/chocdoom/w_file.c
src/chocdoom/w_file_stdc.c
src/chocdoom/w_main.c
src/chocdoom/w_wad.c
src/chocdoom/z_zone.c
src/chocdoom/opl/dbopl.c
src/chocdoom/opl/opl.c
src/chocdoom/opl/opl_blit.cpp
src/chocdoom/opl/opl_queue.c
)
set(SOURCES
src/blit/main.cpp
src/blit/sound.cpp
)
# the 32blit apis are c++, compile everything as c++ so I don't have to write a bunch of wrappers...
set_source_files_properties(${DOOM_SOURCES} PROPERTIES
LANGUAGE CXX
COMPILE_FLAGS "-fpermissive -Wno-write-strings -Wno-literal-suffix"
)
blit_executable(doom ${SOURCES} ${DOOM_SOURCES})
if(EMBED_ASSET_WAD)
blit_assets_yaml(doom assets.yml)
target_compile_definitions(doom PRIVATE "-DASSET_WAD")
endif()
blit_metadata(doom metadata.yml)
target_include_directories(doom PRIVATE src/blit src/chocdoom src/chocdoom/opl)