legacymenu: Make networkingmenu.cpp optional

networkingmenu.cpp was always being built, but the CLIENT_SERVER macro
was used to comment out the implementation. A more orthodox way to
achieve the same effect without relying on macros is to let the build
system decide whether this source file should be built.
This commit is contained in:
Xavier Del Campo Romero 2025-01-19 06:39:13 +01:00
parent 4776e34329
commit 8d3ca718b5
Signed by: xavi
GPG key ID: 84FF3612A9BF43F2
2 changed files with 3 additions and 3 deletions

View file

@ -55,7 +55,7 @@ SET(CONFSCREENS_HEADERS ${CS}/confscreens.h ${CS}/advancedgraphconfig.h
SET(RS racescreens)
SET(RACESCREENS_SOURCES ${RS}/raceselectmenu.cpp
#${RS}/raceweekendmenu.cpp
${RS}/racemanmenu.cpp ${RS}/fileselect.cpp ${RS}/networkingmenu.cpp
${RS}/racemanmenu.cpp ${RS}/fileselect.cpp
${RS}/raceconfigstate.cpp
${RS}/trackselect.cpp ${RS}/driverselect.cpp ${RS}/garagemenu.cpp
${RS}/raceparamsmenu.cpp ${RS}/carsetupmenu.cpp
@ -67,6 +67,8 @@ IF(OPTION_CLIENT_SERVER)
SET(RACESCREENS_SOURCES ${RACESCREENS_SOURCES} ${RS}/csnetworkingmenu.cpp
${RS}/csnetclientsettings.cpp
${RS}/csnetserversettings.cpp)
ELSE()
SET(RACESCREENS_SOURCES ${RACESCREENS_SOURCES} ${RS}/networkingmenu.cpp)
ENDIF(OPTION_CLIENT_SERVER)
SET(RACESCREENS_HEADERS ${RS}/racescreens.h ${RS}/garagemenu.h ${RS}/carsetupmenu.h) #${RS}/raceweekendscreens.h)

View file

@ -22,7 +22,6 @@
Should also allow choosing IP address, track, etc ...
*/
#ifndef CLIENT_SERVER
#include <cstdlib>
#include <cstdio>
#include <string>
@ -1110,4 +1109,3 @@ GetHumanDriver(NetDriver &driver,int index)
return 1;
}
#endif // #ifndef CLIENT_SERVER