Modified files to conditionally use client server networking
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6481 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: bde4ca53ce19a8fbd781a351b346e09ba59051d7 Former-commit-id: 791fae3d502e61e481079ed39e7dcfb96a68e87b
This commit is contained in:
parent
0a66c25821
commit
f18f6220ba
15 changed files with 88 additions and 12 deletions
|
@ -4,7 +4,16 @@ SET(ROBOT_NAME "networkhuman")
|
|||
SET(ROBOT_INTERFACE WELCOME)
|
||||
SET(ROBOT_SOURCES ${ROBOT_NAME}.cpp)
|
||||
|
||||
ADD_SDLIB_INCLUDEDIR(portability tgfclient networking)
|
||||
IF(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC csnetworking)
|
||||
SET(NETWORKING_LIB csnetworking)
|
||||
ELSE(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC networking)
|
||||
SET(NETWORKING_LIB networking)
|
||||
ENDIF(OPTION_CLIENT_SERVER)
|
||||
|
||||
|
||||
ADD_SDLIB_INCLUDEDIR(portability tgfclient ${NETWORKING_INC})
|
||||
IF(OPTION_SDL2)
|
||||
ADD_SDL2_INCLUDEDIR()
|
||||
ELSE(OPTION_SDL2)
|
||||
|
@ -15,6 +24,6 @@ ROBOT_MODULE(NAME ${ROBOT_NAME} VERSION ${VERSION} SOVERSION 0.0.0
|
|||
INTERFACE ${ROBOT_INTERFACE}
|
||||
SOURCES ${ROBOT_SOURCES})
|
||||
|
||||
ADD_SDLIB_LIBRARY(${ROBOT_NAME} portability tgfclient networking)
|
||||
ADD_SDLIB_LIBRARY(${ROBOT_NAME} portability tgfclient ${NETWORKING_LIB})
|
||||
|
||||
# For data associated to the robot module, see data/drivers/networkhuman/CMakeLists.txt
|
||||
|
|
|
@ -28,7 +28,11 @@
|
|||
* Deleted original contents, except for robot interface entry points.
|
||||
*/
|
||||
#include <portability.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
#include <humandriver.h>
|
||||
|
||||
static void initTrack(int index, tTrack* track, void *carHandle, void **carParmHandle, tSituation *s);
|
||||
|
|
|
@ -71,7 +71,8 @@ ELSE(OPTION_USE_MACPORTS)
|
|||
ADD_PLIB_LIBRARY(tgfclient ul sg sl)
|
||||
ENDIF(OPTION_USE_MACPORTS)
|
||||
|
||||
ADD_SDLIB_LIBRARY(tgfclient portability tgf networking)
|
||||
#ADD_SDLIB_LIBRARY(tgfclient portability tgf networking)
|
||||
ADD_SDLIB_LIBRARY(tgfclient portability tgf)
|
||||
|
||||
ADD_PNG_LIBRARY(tgfclient)
|
||||
ADD_JPEG_LIBRARY(tgfclient)
|
||||
|
|
|
@ -12,5 +12,9 @@ ADD_SUBDIRECTORY(racing)
|
|||
|
||||
ADD_SUBDIRECTORY(telemetry)
|
||||
|
||||
ADD_SUBDIRECTORY(networking)
|
||||
IF(OPTION_CLIENT_SERVER)
|
||||
ADD_SUBDIRECTORY(csnetworking)
|
||||
ELSE(OPTION_CLIENT_SERVER)
|
||||
ADD_SUBDIRECTORY(networking)
|
||||
ENDIF(OPTION_CLIENT_SERVER)
|
||||
|
||||
|
|
|
@ -16,12 +16,20 @@ SET(_HEADERS standardgame.h
|
|||
raceutil.h)
|
||||
SET(_OTHER_SOURCES )
|
||||
|
||||
IF(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC csnetworking)
|
||||
SET(NETWORKING_LIB csnetworking)
|
||||
ELSE(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC networking)
|
||||
SET(NETWORKING_LIB networking)
|
||||
ENDIF(OPTION_CLIENT_SERVER)
|
||||
|
||||
ADD_INTERFACE_INCLUDEDIR()
|
||||
|
||||
IF(OPTION_WEBSERVER)
|
||||
ADD_SDLIB_INCLUDEDIR(math portability robottools tgf tgfdata networking tgfclient)
|
||||
ADD_SDLIB_INCLUDEDIR(math portability robottools tgf tgfdata ${NETWORKING_INC} tgfclient)
|
||||
ELSE(OPTION_WEBSERVER)
|
||||
ADD_SDLIB_INCLUDEDIR(math portability robottools tgf tgfdata networking)
|
||||
ADD_SDLIB_INCLUDEDIR(math portability robottools tgf tgfdata ${NETWORKING_INC})
|
||||
ENDIF(OPTION_WEBSERVER)
|
||||
|
||||
ADD_PLIB_INCLUDEDIR()
|
||||
|
@ -57,9 +65,9 @@ SD_ADD_LIBRARY(standardgame MODULE ${_SOURCES} ${_HEADERS} ${_OTHER_SOURCES})
|
|||
# Might not work with GCC 4.5 or + (non-robot modules crash at 1st reload = after 1 dlclose)
|
||||
#SET_TARGET_PROPERTIES(standardgame PROPERTIES VERSION ${VERSION} SOVERSION 0.0.0)
|
||||
IF(OPTION_WEBSERVER)
|
||||
ADD_SDLIB_LIBRARY(standardgame portability tgf tgfdata robottools networking tgfclient)
|
||||
ADD_SDLIB_LIBRARY(standardgame portability tgf tgfdata robottools ${NETWORKING_LIB} tgfclient)
|
||||
ELSE(OPTION_WEBSERVER)
|
||||
ADD_SDLIB_LIBRARY(standardgame portability tgf tgfdata robottools networking)
|
||||
ADD_SDLIB_LIBRARY(standardgame portability tgf tgfdata robottools ${NETWORKING_LIB})
|
||||
ENDIF(OPTION_WEBSERVER)
|
||||
|
||||
IF(OPTION_3RDPARTY_SQLITE3)
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
|
||||
#include <portability.h>
|
||||
#include <raceman.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
#include <robot.h>
|
||||
#include <robottools.h>
|
||||
#include <teammanager.h>
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
#include <portability.h>
|
||||
|
||||
#include <robot.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
|
||||
#include "standardgame.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,11 @@
|
|||
@version $Id$
|
||||
*/
|
||||
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
|
||||
#include "standardgame.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,11 @@
|
|||
#endif
|
||||
|
||||
#include <portability.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
#include <robot.h>
|
||||
#include <raceman.h>
|
||||
#include <replay.h>
|
||||
|
|
|
@ -57,7 +57,17 @@ SET(LEGACYMENU_HEADERS ${MAINSCREENS_HEADERS}
|
|||
|
||||
INCLUDE_DIRECTORIES(. ${MS} ${CS} ${RS})
|
||||
ADD_INTERFACE_INCLUDEDIR()
|
||||
ADD_SDLIB_INCLUDEDIR(math portability tgf tgfclient tgfdata networking)
|
||||
|
||||
IF(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC csnetworking)
|
||||
SET(NETWORKING_LIB csnetworking)
|
||||
ELSE(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC networking)
|
||||
SET(NETWORKING_LIB networking)
|
||||
ENDIF(OPTION_CLIENT_SERVER)
|
||||
|
||||
ADD_SDLIB_INCLUDEDIR(math portability tgf tgfclient tgfdata ${NETWORKING_INC})
|
||||
|
||||
ADD_PLIB_INCLUDEDIR()
|
||||
|
||||
IF(OPTION_SDL2)
|
||||
|
@ -89,6 +99,6 @@ SD_ADD_LIBRARY(legacymenu MODULE ${LEGACYMENU_SOURCES} ${LEGACYMENU_HEADERS})
|
|||
# Might not work with GCC 4.5 or + (non-robot modules crash at 1st reload = after 1 dlclose)
|
||||
#SET_TARGET_PROPERTIES(legacymenu PROPERTIES VERSION ${VERSION} SOVERSION 0.0.0)
|
||||
|
||||
ADD_SDLIB_LIBRARY(legacymenu portability tgf tgfclient tgfdata networking)
|
||||
ADD_SDLIB_LIBRARY(legacymenu portability tgf tgfclient tgfdata ${NETWORKING_LIB})
|
||||
|
||||
SD_INSTALL_FILES(LIB modules/userinterface TARGETS legacymenu)
|
||||
|
|
|
@ -22,7 +22,11 @@ This file deals with car settings
|
|||
*/
|
||||
|
||||
#include <cars.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
|
||||
#include "carsettingsmenu.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,11 @@ This file deals with network host settings
|
|||
*/
|
||||
|
||||
#include <cars.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
|
||||
#include "hostsettingsmenu.h"
|
||||
|
||||
|
|
|
@ -38,7 +38,11 @@
|
|||
#include <tracks.h>
|
||||
#include <cars.h>
|
||||
#include <drivers.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
|
||||
#include <playerconfig.h>
|
||||
#include <playerpref.h>
|
||||
|
|
|
@ -39,7 +39,11 @@
|
|||
#include <cars.h>
|
||||
|
||||
#include <playerconfig.h>
|
||||
#ifdef CLIENT_SERVER
|
||||
#include <csnetwork.h>
|
||||
#else
|
||||
#include <network.h>
|
||||
#endif
|
||||
|
||||
#include "legacymenu.h"
|
||||
#include "racescreens.h"
|
||||
|
|
|
@ -3,9 +3,17 @@ INCLUDE(../../../../cmake/macros.cmake)
|
|||
SET(_SOURCES textonly.cpp)
|
||||
SET(_HEADERS textonly.h)
|
||||
|
||||
IF(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC csnetworking)
|
||||
SET(NETWORKING_LIB csnetworking)
|
||||
ELSE(OPTION_CLIENT_SERVER)
|
||||
SET(NETWORKING_INC networking)
|
||||
SET(NETWORKING_LIB networking)
|
||||
ENDIF(OPTION_CLIENT_SERVER)
|
||||
|
||||
#INCLUDE_DIRECTORIES(.)
|
||||
ADD_INTERFACE_INCLUDEDIR()
|
||||
ADD_SDLIB_INCLUDEDIR(math portability tgf tgfclient tgfdata networking)
|
||||
ADD_SDLIB_INCLUDEDIR(math portability tgf tgfclient tgfdata ${NETWORKING_INC})
|
||||
ADD_PLIB_INCLUDEDIR()
|
||||
|
||||
IF(OPTION_SDL2)
|
||||
|
@ -37,6 +45,6 @@ SD_ADD_LIBRARY(textonly MODULE ${_SOURCES} ${_HEADERS})
|
|||
# Might not work with GCC 4.5 or + (non-robot modules crash at 1st reload = after 1 dlclose)
|
||||
#SET_TARGET_PROPERTIES(textonly PROPERTIES VERSION ${VERSION} SOVERSION 0.0.0)
|
||||
|
||||
ADD_SDLIB_LIBRARY(textonly portability tgf tgfclient tgfdata networking)
|
||||
ADD_SDLIB_LIBRARY(textonly portability tgf tgfclient tgfdata ${NETWORKING_LIB})
|
||||
|
||||
SD_INSTALL_FILES(LIB modules/userinterface TARGETS textonly)
|
||||
|
|
Loading…
Reference in a new issue