Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the headers in the CMake config #252

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,73 @@
add_library(CommonFiles STATIC
CmdArgs.cpp
CmdArgs.h
dirlist.cpp
dirlist.h
eyecandy.cpp
eyecandy.h
FileIO.cpp
FileIO.h
FileList.cpp
FileList.h
Game.cpp
Game.h
GameModeSettings.cpp
GameModeSettings.h
GameValues.cpp
GameValues.h
gfx.cpp
gfx.h
gfx/gfxFont.cpp
gfx/gfxFont.h
gfx/gfxPalette.cpp
gfx/gfxPalette.h
gfx/gfxSDL.cpp
gfx/gfxSDL.h
gfx/gfxSprite.cpp
gfx/gfxSprite.h
gfx/SFont.cpp
gfx/SFont.h
global.cpp
input.cpp
input.h
linfunc.cpp
linfunc.h
map.cpp
map.h
map/MapReader.cpp
map/MapReader.h
map/MapReader15xx.cpp
map/MapReader16xx.cpp
map/MapReader17xx.cpp
map/MapReader18xx.cpp
MapList.cpp
MapList.h
ObjectBase.cpp
ObjectBase.h
path.cpp
path.h
RandomNumberGenerator.cpp
RandomNumberGenerator.h
ResourceManager.cpp
ResourceManager.h
sfx.cpp
sfx.h
TilesetManager.cpp
TilesetManager.h
ui/MI_MapPreview.cpp
ui/MI_MapPreview.h
ui/MI_MapField.cpp
ui/MI_MapField.h
ui/MI_SelectField.cpp
ui/MI_SelectField.h
ui/MI_ImageSelectField.cpp
ui/MI_ImageSelectField.h
ui/MI_SliderField.cpp
ui/MI_SliderField.h
)

if (USE_PNG_SAVE AND NOT USE_SDL2_LIBS)
target_sources(CommonFiles PRIVATE savepng.cpp)
target_sources(CommonFiles PRIVATE savepng.cpp savepng.h)
endif()

target_compile_features(CommonFiles PUBLIC cxx_std_11)
Expand Down
8 changes: 7 additions & 1 deletion src/common_netplay/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
if(NOT NO_NETWORK)
add_library(NetplayFiles STATIC platform_enet/NetPeerENet.cpp)
add_library(NetplayFiles STATIC
NetworkInterface.h
ProtocolDefinitions.h
ProtocolPackages.h
platform_enet/NetPeerENet.cpp
platform_enet/NetPeerENet.h
)

target_link_libraries(NetplayFiles enet)
if (WIN32)
Expand Down
9 changes: 8 additions & 1 deletion src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
add_executable(smw-server
mainServer.cpp
Blob.cpp
Blob.h
Clock.h
Log.cpp
Log.h
NetworkLayerENet.cpp
NetworkLayerENet.h
Player.cpp
Player.h
Room.cpp
Room.h
server.cpp
mainServer.cpp
server.h
)
if(WIN32)
# Add EXE icon on Windows
Expand Down
94 changes: 92 additions & 2 deletions src/smw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,119 +1,209 @@
add_executable(smw WIN32
main.cpp

ai.cpp
ai.h
FPSLimiter.cpp
FPSLimiter.h
gamemodes.cpp
gamemodes.h
GSGameplay.cpp
GSGameplay.h
GSMenu.cpp
GSMenu.h
GSSplashScreen.cpp
main.cpp
GSSplashScreen.h
net.cpp
net.h
network/FileCompressor.cpp
network/FileCompressor.h
network/NetConfigManager.cpp
network/NetConfigManager.h
ObjectContainer.cpp
ObjectContainer.h
objectgame.cpp
objectgame.h
objecthazard.cpp
objecthazard.h
player.cpp
player.h
uicustomcontrol.cpp
uicustomcontrol.h
world.cpp
world.h

../common/movingplatform.cpp
../common/movingplatform.h
../common/uicontrol.cpp
../common/uicontrol.h
../common/uimenu.cpp
../common/uimenu.h
)

#
# Game objects
#
target_sources(smw PRIVATE
objects/blocks/IO_Block.cpp

objects/blocks/BounceBlock.cpp
objects/blocks/BounceBlock.h
objects/blocks/BreakableBlock.cpp
objects/blocks/BreakableBlock.h
objects/blocks/DonutBlock.cpp
objects/blocks/DonutBlock.h
objects/blocks/FlipBlock.cpp
objects/blocks/FlipBlock.h
objects/blocks/NoteBlock.cpp
objects/blocks/NoteBlock.h
objects/blocks/OnOffSwitchBlock.cpp
objects/blocks/OnOffSwitchBlock.h
objects/blocks/PowerupBlock.cpp
objects/blocks/PowerupBlock.h
objects/blocks/ViewBlock.cpp
objects/blocks/ViewBlock.h
objects/blocks/SwitchBlock.cpp
objects/blocks/SwitchBlock.h
objects/blocks/ThrowBlock.cpp
objects/blocks/ThrowBlock.h
objects/blocks/WeaponBreakableBlock.cpp
objects/blocks/WeaponBreakableBlock.h

objects/moving/MovingObject.cpp
objects/moving/MovingObject.h

objects/overmap/OverMapObject.cpp
objects/overmap/OverMapObject.h
)

#
# Player components
#
target_sources(smw PRIVATE
player_components/PlayerAwardEffects.cpp
player_components/PlayerAwardEffects.h
player_components/PlayerBurnupTimer.cpp
player_components/PlayerBurnupTimer.h
player_components/PlayerCollisions.cpp
player_components/PlayerCollisions.h
player_components/PlayerCape.cpp
player_components/PlayerCape.h
player_components/PlayerCardCollection.cpp
player_components/PlayerCardCollection.h
player_components/PlayerInvincibility.cpp
player_components/PlayerInvincibility.h
player_components/PlayerJail.cpp
player_components/PlayerJail.h
player_components/PlayerKuriboShoe.cpp
player_components/PlayerKuriboShoe.h
player_components/PlayerOutOfArenaTimer.cpp
player_components/PlayerOutOfArenaTimer.h
player_components/PlayerSecretCode.cpp
player_components/PlayerSecretCode.h
player_components/PlayerShield.cpp
player_components/PlayerShield.h
player_components/PlayerSpinStatus.cpp
player_components/PlayerSpinStatus.h
player_components/PlayerSuicideTimer.cpp
player_components/PlayerSuicideTimer.h
player_components/PlayerSuperStomp.cpp
player_components/PlayerSuperStomp.h
player_components/PlayerTail.cpp
player_components/PlayerTail.h
player_components/PlayerTanookiSuit.cpp
player_components/PlayerTanookiSuit.h
player_components/PlayerWarpStatus.cpp
player_components/PlayerWarpStatus.h
player_components/PlayerWings.cpp
player_components/PlayerWings.h
)

#
# Menu screens
#
target_sources(smw PRIVATE
menu/MainMenu.cpp
menu/MainMenu.h
menu/BonusWheelMenu.cpp
menu/BonusWheelMenu.h
menu/GameSettingsMenu.cpp
menu/GameSettingsMenu.h
menu/ModeOptionsMenu.cpp
menu/ModeOptionsMenu.h
menu/MapFilterEditMenu.cpp
menu/MapFilterEditMenu.h
menu/MatchSelectionMenu.cpp
menu/MatchSelectionMenu.h
menu/OptionsMenu.cpp
menu/OptionsMenu.h
menu/PlayerControlsMenu.cpp
menu/PlayerControlsMenu.h
menu/PlayerControlsSelectMenu.cpp
menu/PlayerControlsSelectMenu.h
menu/TeamSelectMenu.cpp
menu/TeamSelectMenu.h
menu/TournamentScoreboardMenu.cpp
menu/TournamentScoreboardMenu.h
menu/TourStopMenu.cpp
menu/TourStopMenu.h
menu/WorldMenu.cpp
menu/WorldMenu.h

menu/options/EyeCandyOptionsMenu.cpp
menu/options/EyeCandyOptionsMenu.h
menu/options/GameplayOptionsMenu.cpp
menu/options/GameplayOptionsMenu.h
menu/options/GraphicsOptionsMenu.cpp
menu/options/GraphicsOptionsMenu.h
menu/options/PowerupDropRatesMenu.cpp
menu/options/PowerupDropRatesMenu.h
menu/options/PowerupSettingsMenu.cpp
menu/options/PowerupSettingsMenu.h
menu/options/ProjectileLimitsMenu.cpp
menu/options/ProjectileLimitsMenu.h
menu/options/ProjectileOptionsMenu.cpp
menu/options/ProjectileOptionsMenu.h
menu/options/SoundOptionsMenu.cpp
menu/options/SoundOptionsMenu.h
menu/options/TeamOptionsMenu.cpp
menu/options/TeamOptionsMenu.h

menu/network/NetEditServersMenu.cpp
menu/network/NetEditServersMenu.h
menu/network/NetLobbyMenu.cpp
menu/network/NetLobbyMenu.h
menu/network/NetNewRoomMenu.cpp
menu/network/NetNewRoomMenu.h
menu/network/NetNewRoomSettingsMenu.cpp
menu/network/NetNewRoomSettingsMenu.h
menu/network/NetRoomMenu.cpp
menu/network/NetRoomMenu.h
menu/network/NetServersMenu.cpp
menu/network/NetServersMenu.h

ui/NetworkListScroll.cpp
ui/NetworkListScroll.h
ui/MI_StringScroll.cpp
ui/MI_StringScroll.h
ui/MI_PowerupSlider.cpp
ui/MI_PowerupSlider.h
ui/MI_FrenzyModeOptions.cpp
ui/MI_FrenzyModeOptions.h
ui/MI_InputControlContainer.cpp
ui/MI_InputControlContainer.h
ui/MI_TeamSelect.cpp
ui/MI_TeamSelect.h
ui/MI_NetRoomTeamSelect.cpp
ui/MI_NetRoomTeamSelect.h
)

if(NO_NETWORK)
target_compile_definitions(smw PRIVATE NETWORK_DISABLED)
else()
target_sources(smw PRIVATE platform/network/enet/NetworkLayerENet.cpp)
target_sources(smw PRIVATE
platform/network/enet/NetworkLayerENet.cpp
platform/network/enet/NetworkLayerENet.h
)
endif()

if (WIN32)
Expand Down
13 changes: 13 additions & 0 deletions src/worldeditor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
add_executable(smw-worldedit WIN32
../common/movingplatform.cpp
../common/movingplatform.h
../smw/world.cpp
../smw/world.h
../smw/objects/moving/MovingObject.cpp
../smw/objects/moving/MovingObject.h
../smw/objects/overmap/OverMapObject.cpp
../smw/objects/overmap/OverMapObject.h
../smw/ObjectContainer.cpp
../smw/ObjectContainer.h
../smw/objecthazard.cpp
../smw/objecthazard.h
../smw/menu/ModeOptionsMenu.cpp
../smw/menu/ModeOptionsMenu.h
../common/uicontrol.cpp
../common/uicontrol.h
../common/ui/MI_MapPreview.cpp
../common/ui/MI_MapPreview.h
../common/ui/MI_MapField.cpp
../common/ui/MI_MapField.h
../smw/ui/MI_PowerupSlider.cpp
../smw/ui/MI_PowerupSlider.h
../smw/ui/MI_FrenzyModeOptions.cpp
../smw/ui/MI_FrenzyModeOptions.h
../common/uimenu.cpp
../common/uimenu.h
worldeditor.cpp
)
if (WIN32)
Expand Down