Fix CMake compiling

This commit is contained in:
Zwip-Zwap Zapony 2023-09-19 16:08:06 +02:00
parent 6deaf89f72
commit cfedee9dc9
5 changed files with 147 additions and 66 deletions

View file

@ -8,11 +8,7 @@ LOCAL_SRC_FILES := am_map.c \
command.c \ command.c \
comptime.c \ comptime.c \
console.c \ console.c \
d_clisrv.c \
d_main.c \ d_main.c \
d_net.c \
d_netcmd.c \
d_netfil.c \
dehacked.c \ dehacked.c \
f_finale.c \ f_finale.c \
f_wipe.c \ f_wipe.c \
@ -20,7 +16,6 @@ LOCAL_SRC_FILES := am_map.c \
g_game.c \ g_game.c \
g_input.c \ g_input.c \
hu_stuff.c \ hu_stuff.c \
i_tcp.c \
info.c \ info.c \
lzf.c \ lzf.c \
m_argv.c \ m_argv.c \
@ -32,7 +27,6 @@ LOCAL_SRC_FILES := am_map.c \
m_queue.c \ m_queue.c \
m_random.c \ m_random.c \
md5.c \ md5.c \
mserv.c \
p_ceilng.c \ p_ceilng.c \
p_enemy.c \ p_enemy.c \
p_fab.c \ p_fab.c \
@ -61,6 +55,7 @@ LOCAL_SRC_FILES := am_map.c \
r_things.c \ r_things.c \
s_sound.c \ s_sound.c \
screen.c \ screen.c \
snake.c \
sounds.c \ sounds.c \
st_stuff.c \ st_stuff.c \
string.c \ string.c \

View file

@ -6,10 +6,6 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
config.h.in config.h.in
string.c string.c
d_main.c d_main.c
d_clisrv.c
d_net.c
d_netfil.c
d_netcmd.c
dehacked.c dehacked.c
deh_soc.c deh_soc.c
deh_lua.c deh_lua.c
@ -83,12 +79,10 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
sounds.c sounds.c
w_wad.c w_wad.c
filesrch.c filesrch.c
mserv.c
http-mserv.c
i_tcp.c
lzf.c lzf.c
b_bot.c b_bot.c
u_list.c u_list.c
snake.c
lua_script.c lua_script.c
lua_baselib.c lua_baselib.c
lua_mathlib.c lua_mathlib.c
@ -149,6 +143,7 @@ set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL
"Compile a development build of SRB2.") "Compile a development build of SRB2.")
add_subdirectory(blua) add_subdirectory(blua)
add_subdirectory(netcode)
# OS macros # OS macros
if (UNIX) if (UNIX)

View file

@ -0,0 +1,15 @@
target_sources(SRB2SDL2 PRIVATE
d_clisrv.c
server_connection.c
client_connection.c
tic_command.c
net_command.c
gamestate.c
commands.c
d_net.c
d_netcmd.c
d_netfil.c
http-mserv.c
i_tcp.c
mserv.c
)

View file

@ -262,7 +262,6 @@
<ClInclude Include="..\u_list.h" /> <ClInclude Include="..\u_list.h" />
<ClInclude Include="..\hu_stuff.h" /> <ClInclude Include="..\hu_stuff.h" />
<ClInclude Include="..\info.h" /> <ClInclude Include="..\info.h" />
<ClInclude Include="..\i_addrinfo.h" />
<ClInclude Include="..\i_joy.h" /> <ClInclude Include="..\i_joy.h" />
<ClInclude Include="..\i_net.h" /> <ClInclude Include="..\i_net.h" />
<ClInclude Include="..\i_sound.h" /> <ClInclude Include="..\i_sound.h" />
@ -297,6 +296,21 @@
<ClInclude Include="..\m_queue.h" /> <ClInclude Include="..\m_queue.h" />
<ClInclude Include="..\m_random.h" /> <ClInclude Include="..\m_random.h" />
<ClInclude Include="..\m_swap.h" /> <ClInclude Include="..\m_swap.h" />
<ClInclude Include="..\netcode\client_connection.h" />
<ClInclude Include="..\netcode\commands.h" />
<ClInclude Include="..\netcode\d_clisrv.h" />
<ClInclude Include="..\netcode\d_net.h" />
<ClInclude Include="..\netcode\d_netcmd.h" />
<ClInclude Include="..\netcode\d_netfil.h" />
<ClInclude Include="..\netcode\gamestate.h" />
<ClInclude Include="..\netcode\i_addrinfo.h" />
<ClInclude Include="..\netcode\i_net.h" />
<ClInclude Include="..\netcode\i_tcp.h" />
<ClInclude Include="..\netcode\mserv.h" />
<ClInclude Include="..\netcode\net_command.h" />
<ClInclude Include="..\netcode\protocol.h" />
<ClInclude Include="..\netcode\server_connection.h" />
<ClInclude Include="..\netcode\tic_command.h" />
<ClInclude Include="..\p5prof.h" /> <ClInclude Include="..\p5prof.h" />
<ClInclude Include="..\p_haptic.h" /> <ClInclude Include="..\p_haptic.h" />
<ClInclude Include="..\p_local.h" /> <ClInclude Include="..\p_local.h" />
@ -329,6 +343,7 @@
<ClInclude Include="..\r_textures.h" /> <ClInclude Include="..\r_textures.h" />
<ClInclude Include="..\r_things.h" /> <ClInclude Include="..\r_things.h" />
<ClInclude Include="..\screen.h" /> <ClInclude Include="..\screen.h" />
<ClInclude Include="..\snake.h" />
<ClInclude Include="..\sounds.h" /> <ClInclude Include="..\sounds.h" />
<ClInclude Include="..\st_stuff.h" /> <ClInclude Include="..\st_stuff.h" />
<ClInclude Include="..\s_sound.h" /> <ClInclude Include="..\s_sound.h" />
@ -400,11 +415,7 @@
<ClCompile Include="..\deh_soc.c" /> <ClCompile Include="..\deh_soc.c" />
<ClCompile Include="..\deh_lua.c" /> <ClCompile Include="..\deh_lua.c" />
<ClCompile Include="..\deh_tables.c" /> <ClCompile Include="..\deh_tables.c" />
<ClCompile Include="..\d_clisrv.c" />
<ClCompile Include="..\d_main.c" /> <ClCompile Include="..\d_main.c" />
<ClCompile Include="..\d_net.c" />
<ClCompile Include="..\d_netcmd.c" />
<ClCompile Include="..\d_netfil.c" />
<ClCompile Include="..\filesrch.c" /> <ClCompile Include="..\filesrch.c" />
<ClCompile Include="..\f_finale.c" /> <ClCompile Include="..\f_finale.c" />
<ClCompile Include="..\f_wipe.c" /> <ClCompile Include="..\f_wipe.c" />
@ -427,10 +438,6 @@
<ClCompile Include="..\u_list.c" /> <ClCompile Include="..\u_list.c" />
<ClCompile Include="..\hu_stuff.c" /> <ClCompile Include="..\hu_stuff.c" />
<ClCompile Include="..\info.c" /> <ClCompile Include="..\info.c" />
<ClCompile Include="..\i_addrinfo.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\i_tcp.c" />
<ClCompile Include="..\i_time.c" /> <ClCompile Include="..\i_time.c" />
<ClCompile Include="..\lua_baselib.c" /> <ClCompile Include="..\lua_baselib.c" />
<ClCompile Include="..\lua_blockmaplib.c" /> <ClCompile Include="..\lua_blockmaplib.c" />
@ -451,8 +458,6 @@
<ClCompile Include="..\lua_thinkerlib.c" /> <ClCompile Include="..\lua_thinkerlib.c" />
<ClCompile Include="..\lzf.c" /> <ClCompile Include="..\lzf.c" />
<ClCompile Include="..\md5.c" /> <ClCompile Include="..\md5.c" />
<ClCompile Include="..\mserv.c" />
<ClCompile Include="..\http-mserv.c" />
<ClCompile Include="..\m_aatree.c" /> <ClCompile Include="..\m_aatree.c" />
<ClCompile Include="..\m_anigif.c" /> <ClCompile Include="..\m_anigif.c" />
<ClCompile Include="..\m_argv.c" /> <ClCompile Include="..\m_argv.c" />
@ -466,6 +471,22 @@
<ClCompile Include="..\m_perfstats.c" /> <ClCompile Include="..\m_perfstats.c" />
<ClCompile Include="..\m_queue.c" /> <ClCompile Include="..\m_queue.c" />
<ClCompile Include="..\m_random.c" /> <ClCompile Include="..\m_random.c" />
<ClCompile Include="..\netcode\client_connection.c" />
<ClCompile Include="..\netcode\commands.c" />
<ClCompile Include="..\netcode\d_clisrv.c" />
<ClCompile Include="..\netcode\d_net.c" />
<ClCompile Include="..\netcode\d_netcmd.c" />
<ClCompile Include="..\netcode\d_netfil.c" />
<ClCompile Include="..\netcode\gamestate.c" />
<ClCompile Include="..\netcode\http-mserv.c" />
<ClCompile Include="..\netcode\i_addrinfo.c">
<ExcludedFromBuild>true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\netcode\i_tcp.c" />
<ClCompile Include="..\netcode\mserv.c" />
<ClCompile Include="..\netcode\net_command.c" />
<ClCompile Include="..\netcode\server_connection.c" />
<ClCompile Include="..\netcode\tic_command.c" />
<ClCompile Include="..\p_ceilng.c" /> <ClCompile Include="..\p_ceilng.c" />
<ClCompile Include="..\p_enemy.c" /> <ClCompile Include="..\p_enemy.c" />
<ClCompile Include="..\p_floor.c" /> <ClCompile Include="..\p_floor.c" />
@ -510,6 +531,7 @@
<ClCompile Include="..\r_textures.c" /> <ClCompile Include="..\r_textures.c" />
<ClCompile Include="..\r_things.c" /> <ClCompile Include="..\r_things.c" />
<ClCompile Include="..\screen.c" /> <ClCompile Include="..\screen.c" />
<ClCompile Include="..\snake.c" />
<ClCompile Include="..\sounds.c" /> <ClCompile Include="..\sounds.c" />
<ClCompile Include="..\string.c" /> <ClCompile Include="..\string.c" />
<ClCompile Include="..\st_stuff.c" /> <ClCompile Include="..\st_stuff.c" />

View file

@ -156,24 +156,12 @@
<ClInclude Include="..\doomtype.h"> <ClInclude Include="..\doomtype.h">
<Filter>D_Doom</Filter> <Filter>D_Doom</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\d_clisrv.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\d_event.h"> <ClInclude Include="..\d_event.h">
<Filter>D_Doom</Filter> <Filter>D_Doom</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\d_main.h"> <ClInclude Include="..\d_main.h">
<Filter>D_Doom</Filter> <Filter>D_Doom</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\d_net.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\d_netcmd.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\d_netfil.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\d_player.h"> <ClInclude Include="..\d_player.h">
<Filter>D_Doom</Filter> <Filter>D_Doom</Filter>
</ClInclude> </ClInclude>
@ -279,9 +267,6 @@
<ClInclude Include="..\filesrch.h"> <ClInclude Include="..\filesrch.h">
<Filter>I_Interface</Filter> <Filter>I_Interface</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\i_addrinfo.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\i_joy.h"> <ClInclude Include="..\i_joy.h">
<Filter>I_Interface</Filter> <Filter>I_Interface</Filter>
</ClInclude> </ClInclude>
@ -306,12 +291,6 @@
<ClInclude Include="..\keys.h"> <ClInclude Include="..\keys.h">
<Filter>I_Interface</Filter> <Filter>I_Interface</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\mserv.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\http-mserv.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\lua_hook.h"> <ClInclude Include="..\lua_hook.h">
<Filter>LUA</Filter> <Filter>LUA</Filter>
</ClInclude> </ClInclude>
@ -372,6 +351,54 @@
<ClInclude Include="..\m_swap.h"> <ClInclude Include="..\m_swap.h">
<Filter>M_Misc</Filter> <Filter>M_Misc</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\netcode\client_connection.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\commands.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\d_clisrv.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\d_net.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\d_netcmd.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\d_netfil.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\gamestate.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\http-mserv.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\netcode\i_addrinfo.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\netcode\i_net.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\netcode\i_tcp.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\netcode\mserv.h">
<Filter>I_Interface</Filter>
</ClInclude>
<ClInclude Include="..\netcode\net_command.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\protocol.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\server_connection.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\netcode\tic_command.h">
<Filter>D_Doom</Filter>
</ClInclude>
<ClInclude Include="..\comptime.h"> <ClInclude Include="..\comptime.h">
<Filter>O_Other</Filter> <Filter>O_Other</Filter>
</ClInclude> </ClInclude>
@ -465,6 +492,9 @@
<ClInclude Include="..\v_video.h"> <ClInclude Include="..\v_video.h">
<Filter>R_Rend</Filter> <Filter>R_Rend</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\snake.h">
<Filter>M_Misc</Filter>
</ClInclude>
<ClInclude Include="..\sounds.h"> <ClInclude Include="..\sounds.h">
<Filter>S_Sounds</Filter> <Filter>S_Sounds</Filter>
</ClInclude> </ClInclude>
@ -639,21 +669,9 @@
<ClCompile Include="..\deh_tables.c"> <ClCompile Include="..\deh_tables.c">
<Filter>D_Doom</Filter> <Filter>D_Doom</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\d_clisrv.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\d_main.c"> <ClCompile Include="..\d_main.c">
<Filter>D_Doom</Filter> <Filter>D_Doom</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\d_net.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\d_netcmd.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\d_netfil.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\z_zone.c"> <ClCompile Include="..\z_zone.c">
<Filter>D_Doom</Filter> <Filter>D_Doom</Filter>
</ClCompile> </ClCompile>
@ -732,18 +750,9 @@
<ClCompile Include="..\filesrch.c"> <ClCompile Include="..\filesrch.c">
<Filter>I_Interface</Filter> <Filter>I_Interface</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\i_addrinfo.c">
<Filter>I_Interface</Filter>
</ClCompile>
<ClCompile Include="..\i_tcp.c"> <ClCompile Include="..\i_tcp.c">
<Filter>I_Interface</Filter> <Filter>I_Interface</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\mserv.c">
<Filter>I_Interface</Filter>
</ClCompile>
<ClCompile Include="..\http-mserv.c">
<Filter>I_Interface</Filter>
</ClCompile>
<ClCompile Include="..\lua_baselib.c"> <ClCompile Include="..\lua_baselib.c">
<Filter>LUA</Filter> <Filter>LUA</Filter>
</ClCompile> </ClCompile>
@ -831,6 +840,48 @@
<ClCompile Include="..\m_random.c"> <ClCompile Include="..\m_random.c">
<Filter>M_Misc</Filter> <Filter>M_Misc</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\netcode\client_connection.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\commands.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\d_clisrv.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\d_net.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\d_netcmd.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\d_netfil.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\gamestate.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\http-mserv.c">
<Filter>I_Interface</Filter>
</ClCompile>
<ClCompile Include="..\netcode\i_addrinfo.c">
<Filter>I_Interface</Filter>
</ClCompile>
<ClCompile Include="..\netcode\i_tcp.c">
<Filter>I_Interface</Filter>
</ClCompile>
<ClCompile Include="..\netcode\mserv.c">
<Filter>I_Interface</Filter>
</ClCompile>
<ClCompile Include="..\netcode\net_command.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\server_connection.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\netcode\tic_command.c">
<Filter>D_Doom</Filter>
</ClCompile>
<ClCompile Include="..\string.c"> <ClCompile Include="..\string.c">
<Filter>M_Misc</Filter> <Filter>M_Misc</Filter>
</ClCompile> </ClCompile>
@ -954,6 +1005,9 @@
<ClCompile Include="..\v_video.c"> <ClCompile Include="..\v_video.c">
<Filter>R_Rend</Filter> <Filter>R_Rend</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\snake.c">
<Filter>M_Misc</Filter>
</ClCompile>
<ClCompile Include="..\sounds.c"> <ClCompile Include="..\sounds.c">
<Filter>S_Sounds</Filter> <Filter>S_Sounds</Filter>
</ClCompile> </ClCompile>