From 7e544180222d6c19441c3b4c7ef3bfe821e671b7 Mon Sep 17 00:00:00 2001 From: Bouke Haarsma Date: Sat, 2 Sep 2023 19:46:52 +0200 Subject: [PATCH] Codechange: workaround CMake/Xcode duplicate file name issue (#11186) Having a library with files with the same name isn't supported in CMake's Xcode project file generation: https://gitlab.kitware.com/cmake/cmake/-/issues/20501. One of the files is renamed to work around this bug. --- src/console_cmds.cpp | 2 +- src/network/core/CMakeLists.txt | 4 ++-- src/network/core/{game_info.cpp => network_game_info.cpp} | 2 +- src/network/core/{game_info.h => network_game_info.h} | 0 src/network/core/tcp_coordinator.h | 2 +- src/network/core/tcp_turn.h | 2 +- src/network/core/udp.cpp | 2 +- src/network/network_admin.cpp | 2 +- src/network/network_gamelist.h | 2 +- src/network/network_query.cpp | 2 +- src/network/network_server.cpp | 2 +- src/network/network_udp.cpp | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename src/network/core/{game_info.cpp => network_game_info.cpp} (99%) rename src/network/core/{game_info.h => network_game_info.h} (100%) diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 702a774ba9..b3e3607bce 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -13,7 +13,7 @@ #include "engine_func.h" #include "landscape.h" #include "saveload/saveload.h" -#include "network/core/game_info.h" +#include "network/core/network_game_info.h" #include "network/network.h" #include "network/network_func.h" #include "network/network_base.h" diff --git a/src/network/core/CMakeLists.txt b/src/network/core/CMakeLists.txt index 9e7a2ed506..b547b6fa95 100644 --- a/src/network/core/CMakeLists.txt +++ b/src/network/core/CMakeLists.txt @@ -5,8 +5,8 @@ add_files( config.h core.cpp core.h - game_info.cpp - game_info.h + network_game_info.cpp + network_game_info.h host.cpp host.h http.h diff --git a/src/network/core/game_info.cpp b/src/network/core/network_game_info.cpp similarity index 99% rename from src/network/core/game_info.cpp rename to src/network/core/network_game_info.cpp index fd95fe1dfb..0993e1ad15 100644 --- a/src/network/core/game_info.cpp +++ b/src/network/core/network_game_info.cpp @@ -10,7 +10,7 @@ */ #include "../../stdafx.h" -#include "game_info.h" +#include "network_game_info.h" #include "../../core/bitmath_func.hpp" #include "../../company_base.h" #include "../../timer/timer_game_calendar.h" diff --git a/src/network/core/game_info.h b/src/network/core/network_game_info.h similarity index 100% rename from src/network/core/game_info.h rename to src/network/core/network_game_info.h diff --git a/src/network/core/tcp_coordinator.h b/src/network/core/tcp_coordinator.h index 545cdb281d..6e6b98f5c1 100644 --- a/src/network/core/tcp_coordinator.h +++ b/src/network/core/tcp_coordinator.h @@ -15,7 +15,7 @@ #include "os_abstraction.h" #include "tcp.h" #include "packet.h" -#include "game_info.h" +#include "network_game_info.h" /** * Enum with all types of TCP Game Coordinator packets. The order MUST not be changed. diff --git a/src/network/core/tcp_turn.h b/src/network/core/tcp_turn.h index b35d26ad7b..b54a857982 100644 --- a/src/network/core/tcp_turn.h +++ b/src/network/core/tcp_turn.h @@ -15,7 +15,7 @@ #include "os_abstraction.h" #include "tcp.h" #include "packet.h" -#include "game_info.h" +#include "network_game_info.h" /** Enum with all types of TCP TURN packets. The order MUST not be changed. **/ enum PacketTurnType { diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index 9f4a09e67c..4c226f0115 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -12,7 +12,7 @@ #include "../../stdafx.h" #include "../../timer/timer_game_calendar.h" #include "../../debug.h" -#include "game_info.h" +#include "network_game_info.h" #include "udp.h" #include "../../safeguards.h" diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp index 2ad53d972e..ae42156d29 100644 --- a/src/network/network_admin.cpp +++ b/src/network/network_admin.cpp @@ -11,7 +11,7 @@ #include "../strings_func.h" #include "../timer/timer_game_calendar.h" #include "../timer/timer_game_calendar.h" -#include "core/game_info.h" +#include "core/network_game_info.h" #include "network_admin.h" #include "network_base.h" #include "network_server.h" diff --git a/src/network/network_gamelist.h b/src/network/network_gamelist.h index 1c4a68e5c7..cabedd8ff7 100644 --- a/src/network/network_gamelist.h +++ b/src/network/network_gamelist.h @@ -11,7 +11,7 @@ #define NETWORK_GAMELIST_H #include "core/address.h" -#include "core/game_info.h" +#include "core/network_game_info.h" #include "network_type.h" /** The status a server can be in. */ diff --git a/src/network/network_query.cpp b/src/network/network_query.cpp index 139daafe45..441c22e816 100644 --- a/src/network/network_query.cpp +++ b/src/network/network_query.cpp @@ -8,7 +8,7 @@ /** @file network_query.cpp Query part of the network protocol. */ #include "../stdafx.h" -#include "core/game_info.h" +#include "core/network_game_info.h" #include "network_query.h" #include "network_gamelist.h" #include "../error.h" diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 24c6537530..a81fe597c5 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -9,7 +9,7 @@ #include "../stdafx.h" #include "../strings_func.h" -#include "core/game_info.h" +#include "core/network_game_info.h" #include "network_admin.h" #include "network_server.h" #include "network_udp.h" diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 6975d1c767..7e7509fd70 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -16,7 +16,7 @@ #include "../timer/timer_game_calendar.h" #include "../map_func.h" #include "../debug.h" -#include "core/game_info.h" +#include "core/network_game_info.h" #include "network_gamelist.h" #include "network_internal.h" #include "network_udp.h"