From 09e8cc25fe38236acf6a4d58869e13c72b3d7af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Mustoha?= Date: Sat, 25 May 2024 23:18:49 +0200 Subject: [PATCH] Split up and cleaned some CMake files --- src/common/CMakeLists.txt | 23 +--- src/common/ui/CMakeLists.txt | 23 ++++ src/smw/CMakeLists.txt | 144 +---------------------- src/smw/menu/CMakeLists.txt | 60 ++++++++++ src/smw/player_components/CMakeLists.txt | 38 ++++++ 5 files changed, 125 insertions(+), 163 deletions(-) create mode 100644 src/common/ui/CMakeLists.txt create mode 100644 src/smw/menu/CMakeLists.txt create mode 100644 src/smw/player_components/CMakeLists.txt diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 908bdd1e..175272fe 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -66,29 +66,10 @@ add_library(CommonFiles STATIC uicontrol.h uimenu.cpp uimenu.h - ui/MenuCode.h - ui/MI_Button.cpp - ui/MI_Button.h - ui/MI_Image.cpp - ui/MI_Image.h - ui/MI_ImageSelectField.cpp - ui/MI_ImageSelectField.h - ui/MI_MapField.cpp - ui/MI_MapField.h - ui/MI_MapPreview.cpp - ui/MI_MapPreview.h - ui/MI_ScoreText.cpp - ui/MI_ScoreText.h - ui/MI_SelectField.cpp - ui/MI_SelectField.h - ui/MI_SliderField.cpp - ui/MI_SliderField.h - ui/MI_Text.cpp - ui/MI_Text.h - ui/MI_TextField.cpp - ui/MI_TextField.h ) +add_subdirectory(ui) + if (USE_PNG_SAVE AND NOT USE_SDL2_LIBS) target_sources(CommonFiles PRIVATE savepng.cpp savepng.h) endif() diff --git a/src/common/ui/CMakeLists.txt b/src/common/ui/CMakeLists.txt new file mode 100644 index 00000000..bfafa755 --- /dev/null +++ b/src/common/ui/CMakeLists.txt @@ -0,0 +1,23 @@ +target_sources(CommonFiles PRIVATE + MenuCode.h + MI_Button.cpp + MI_Button.h + MI_Image.cpp + MI_Image.h + MI_ImageSelectField.cpp + MI_ImageSelectField.h + MI_MapField.cpp + MI_MapField.h + MI_MapPreview.cpp + MI_MapPreview.h + MI_ScoreText.cpp + MI_ScoreText.h + MI_SelectField.cpp + MI_SelectField.h + MI_SliderField.cpp + MI_SliderField.h + MI_Text.cpp + MI_Text.h + MI_TextField.cpp + MI_TextField.h +) diff --git a/src/smw/CMakeLists.txt b/src/smw/CMakeLists.txt index c4a83d29..3ad934c4 100644 --- a/src/smw/CMakeLists.txt +++ b/src/smw/CMakeLists.txt @@ -32,148 +32,8 @@ add_executable(smw WIN32 ../common/movingplatform.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 -) - +add_subdirectory(player_components) +add_subdirectory(menu) add_subdirectory(gamemodes) add_subdirectory(objects) add_subdirectory(ui) diff --git a/src/smw/menu/CMakeLists.txt b/src/smw/menu/CMakeLists.txt new file mode 100644 index 00000000..daf65973 --- /dev/null +++ b/src/smw/menu/CMakeLists.txt @@ -0,0 +1,60 @@ +target_sources(smw PRIVATE + MainMenu.cpp + MainMenu.h + BonusWheelMenu.cpp + BonusWheelMenu.h + GameSettingsMenu.cpp + GameSettingsMenu.h + ModeOptionsMenu.cpp + ModeOptionsMenu.h + MapFilterEditMenu.cpp + MapFilterEditMenu.h + MatchSelectionMenu.cpp + MatchSelectionMenu.h + OptionsMenu.cpp + OptionsMenu.h + PlayerControlsMenu.cpp + PlayerControlsMenu.h + PlayerControlsSelectMenu.cpp + PlayerControlsSelectMenu.h + TeamSelectMenu.cpp + TeamSelectMenu.h + TournamentScoreboardMenu.cpp + TournamentScoreboardMenu.h + TourStopMenu.cpp + TourStopMenu.h + WorldMenu.cpp + WorldMenu.h + + options/EyeCandyOptionsMenu.cpp + options/EyeCandyOptionsMenu.h + options/GameplayOptionsMenu.cpp + options/GameplayOptionsMenu.h + options/GraphicsOptionsMenu.cpp + options/GraphicsOptionsMenu.h + options/PowerupDropRatesMenu.cpp + options/PowerupDropRatesMenu.h + options/PowerupSettingsMenu.cpp + options/PowerupSettingsMenu.h + options/ProjectileLimitsMenu.cpp + options/ProjectileLimitsMenu.h + options/ProjectileOptionsMenu.cpp + options/ProjectileOptionsMenu.h + options/SoundOptionsMenu.cpp + options/SoundOptionsMenu.h + options/TeamOptionsMenu.cpp + options/TeamOptionsMenu.h + + network/NetEditServersMenu.cpp + network/NetEditServersMenu.h + network/NetLobbyMenu.cpp + network/NetLobbyMenu.h + network/NetNewRoomMenu.cpp + network/NetNewRoomMenu.h + network/NetNewRoomSettingsMenu.cpp + network/NetNewRoomSettingsMenu.h + network/NetRoomMenu.cpp + network/NetRoomMenu.h + network/NetServersMenu.cpp + network/NetServersMenu.h +) diff --git a/src/smw/player_components/CMakeLists.txt b/src/smw/player_components/CMakeLists.txt new file mode 100644 index 00000000..208d4822 --- /dev/null +++ b/src/smw/player_components/CMakeLists.txt @@ -0,0 +1,38 @@ +target_sources(smw PRIVATE + PlayerAwardEffects.cpp + PlayerAwardEffects.h + PlayerBurnupTimer.cpp + PlayerBurnupTimer.h + PlayerCollisions.cpp + PlayerCollisions.h + PlayerCape.cpp + PlayerCape.h + PlayerCardCollection.cpp + PlayerCardCollection.h + PlayerInvincibility.cpp + PlayerInvincibility.h + PlayerJail.cpp + PlayerJail.h + PlayerKuriboShoe.cpp + PlayerKuriboShoe.h + PlayerOutOfArenaTimer.cpp + PlayerOutOfArenaTimer.h + PlayerSecretCode.cpp + PlayerSecretCode.h + PlayerShield.cpp + PlayerShield.h + PlayerSpinStatus.cpp + PlayerSpinStatus.h + PlayerSuicideTimer.cpp + PlayerSuicideTimer.h + PlayerSuperStomp.cpp + PlayerSuperStomp.h + PlayerTail.cpp + PlayerTail.h + PlayerTanookiSuit.cpp + PlayerTanookiSuit.h + PlayerWarpStatus.cpp + PlayerWarpStatus.h + PlayerWings.cpp + PlayerWings.h +)