1
0

Use CMake's Android generators to crosscompile

This commit is contained in:
Tiger Wang
2016-11-07 22:15:07 +00:00
committed by Alexander Harkness
parent c59ff9b431
commit 8c6d0b51c7
49 changed files with 149 additions and 1408 deletions

View File

@@ -8,6 +8,20 @@
#include <csignal>
#include <stdlib.h>
#ifdef ANDROID
// Workaround for Android NDK builds that do not support std::to_string
namespace std
{
template <typename T>
std::string to_string(T Value)
{
std::ostringstream TempStream;
TempStream << Value;
return TempStream.str();
}
}
#endif
#ifdef _MSC_VER
#include <dbghelp.h>
#endif // _MSC_VER
@@ -223,14 +237,11 @@ static void UniversalMain(std::unique_ptr<cSettingsRepositoryInterface> a_Overri
// Initialize LibEvent:
cNetworkSingleton::Get().Initialise();
#if !defined(ANDROID_NDK)
try
#endif
{
cRoot Root;
Root.Start(std::move(a_OverridesRepo));
}
#if !defined(ANDROID_NDK)
catch (std::exception & e)
{
LOGERROR("Standard exception: %s", e.what());
@@ -239,7 +250,6 @@ static void UniversalMain(std::unique_ptr<cSettingsRepositoryInterface> a_Overri
{
LOGERROR("Unknown exception!");
}
#endif
// Shutdown all of LibEvent:
cNetworkSingleton::Get().Terminate();