mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Handle the platform differences in CMake.
This commit is contained in:
parent
3852f0e720
commit
2696ac134c
|
@ -68,13 +68,17 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(AUTO_DEPENDENCIES_DEFAULT OFF)
|
set(AUTO_DEPENDENCIES_DEFAULT OFF)
|
||||||
|
set(AUTOUPDATE_DEFAULT OFF)
|
||||||
if(TARGET_OS STREQUAL "windows")
|
if(TARGET_OS STREQUAL "windows")
|
||||||
set(AUTO_DEPENDENCIES_DEFAULT ON)
|
set(AUTO_DEPENDENCIES_DEFAULT ON)
|
||||||
|
set(AUTOUPDATE_DEFAULT ON)
|
||||||
|
elseif(TARGET_OS STREQUAL "linux")
|
||||||
|
set(AUTOUPDATE_DEFAULT ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(WEBSOCKETS "Enable websockets support" OFF)
|
option(WEBSOCKETS "Enable websockets support" OFF)
|
||||||
option(MYSQL "Enable mysql support" OFF)
|
option(MYSQL "Enable mysql support" OFF)
|
||||||
option(AUTOUPDATE "Enable the autoupdater" ON)
|
option(AUTOUPDATE "Enable the autoupdater" ${AUTOUPDATE_DEFAULT})
|
||||||
option(CLIENT "Compile client" ON)
|
option(CLIENT "Compile client" ON)
|
||||||
option(DOWNLOAD_GTEST "Download and compile GTest" ${AUTO_DEPENDENCIES_DEFAULT})
|
option(DOWNLOAD_GTEST "Download and compile GTest" ${AUTO_DEPENDENCIES_DEFAULT})
|
||||||
option(PREFER_BUNDLED_LIBS "Prefer bundled libraries over system libraries" ${AUTO_DEPENDENCIES_DEFAULT})
|
option(PREFER_BUNDLED_LIBS "Prefer bundled libraries over system libraries" ${AUTO_DEPENDENCIES_DEFAULT})
|
||||||
|
|
|
@ -2617,7 +2617,7 @@ void CClient::RegisterInterfaces()
|
||||||
Kernel()->RegisterInterface(static_cast<IGhostRecorder*>(&m_GhostRecorder), false);
|
Kernel()->RegisterInterface(static_cast<IGhostRecorder*>(&m_GhostRecorder), false);
|
||||||
Kernel()->RegisterInterface(static_cast<IGhostLoader*>(&m_GhostLoader), false);
|
Kernel()->RegisterInterface(static_cast<IGhostLoader*>(&m_GhostLoader), false);
|
||||||
Kernel()->RegisterInterface(static_cast<IServerBrowser*>(&m_ServerBrowser), false);
|
Kernel()->RegisterInterface(static_cast<IServerBrowser*>(&m_ServerBrowser), false);
|
||||||
#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
#if defined(CONF_AUTOUPDATE)
|
||||||
Kernel()->RegisterInterface(static_cast<IUpdater*>(&m_Updater), false);
|
Kernel()->RegisterInterface(static_cast<IUpdater*>(&m_Updater), false);
|
||||||
#endif
|
#endif
|
||||||
Kernel()->RegisterInterface(static_cast<IFriends*>(&m_Friends), false);
|
Kernel()->RegisterInterface(static_cast<IFriends*>(&m_Friends), false);
|
||||||
|
@ -2635,7 +2635,7 @@ void CClient::InitInterfaces()
|
||||||
m_pInput = Kernel()->RequestInterface<IEngineInput>();
|
m_pInput = Kernel()->RequestInterface<IEngineInput>();
|
||||||
m_pMap = Kernel()->RequestInterface<IEngineMap>();
|
m_pMap = Kernel()->RequestInterface<IEngineMap>();
|
||||||
m_pMasterServer = Kernel()->RequestInterface<IEngineMasterServer>();
|
m_pMasterServer = Kernel()->RequestInterface<IEngineMasterServer>();
|
||||||
#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
#if defined(CONF_AUTOUPDATE)
|
||||||
m_pUpdater = Kernel()->RequestInterface<IUpdater>();
|
m_pUpdater = Kernel()->RequestInterface<IUpdater>();
|
||||||
#endif
|
#endif
|
||||||
m_pStorage = Kernel()->RequestInterface<IStorage>();
|
m_pStorage = Kernel()->RequestInterface<IStorage>();
|
||||||
|
@ -2646,7 +2646,7 @@ void CClient::InitInterfaces()
|
||||||
|
|
||||||
HttpInit(m_pStorage);
|
HttpInit(m_pStorage);
|
||||||
|
|
||||||
#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
#if defined(CONF_AUTOUPDATE)
|
||||||
m_Updater.Init();
|
m_Updater.Init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2832,7 +2832,7 @@ void CClient::Run()
|
||||||
// update input
|
// update input
|
||||||
if(Input()->Update())
|
if(Input()->Update())
|
||||||
break; // SDL_QUIT
|
break; // SDL_QUIT
|
||||||
#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__)
|
#if defined(CONF_AUTOUPDATE)
|
||||||
Updater()->Update();
|
Updater()->Update();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue