allow enabeling Network Multiplayer through CMake flags

This commit is contained in:
konstin 2015-08-08 14:26:12 +02:00
parent 43d5dbeb3e
commit c79c51e6c7
2 changed files with 13 additions and 4 deletions

View File

@ -19,6 +19,7 @@ option(USE_WIIUSE "Support for wiimote input devices" ON)
option(USE_FRIBIDI "Support for right-to-left languages" ON) option(USE_FRIBIDI "Support for right-to-left languages" ON)
option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON) option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON)
option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF) option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF)
option(ENABLE_NETWORK_MULTIPLAYER "Option description" OFF)
if(MSVC AND (MSVC_VERSION LESS 1900)) if(MSVC AND (MSVC_VERSION LESS 1900))
# Normally hide the option to build wiiuse on VS, since it depends # Normally hide the option to build wiiuse on VS, since it depends
@ -195,6 +196,11 @@ if(UNIX AND NOT APPLE)
endif() endif()
endif() endif()
# Netwowk Multiplayer
if(ENABLE_NETWORK_MULTIPLAYER)
add_definitions(-DENABLE_NETWORK_MULTIPLAYER_SCREEN)
endif()
# Set some compiler options # Set some compiler options
if(UNIX OR MINGW) if(UNIX OR MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")

View File

@ -494,9 +494,12 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
if (PlayerManager::getCurrentOnlineId()) if (PlayerManager::getCurrentOnlineId())
{ {
// For 0.8.2 disable the server menu, instead go to online profile // For 0.8.2 disable the server menu, instead go to online profile
//OnlineScreen::getInstance()->push(); #ifdef ENABLE_NETWORK_MULTIPLAYER_SCREEN
OnlineScreen::getInstance()->push();
#else
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId()); ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
TabOnlineProfileAchievements::getInstance()->push(); TabOnlineProfileAchievements::getInstance()->push();
#endif
} }
else else
{ {