summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-11-07 23:15:07 +0100
committerAlexander Harkness <me@bearbin.net>2016-12-12 15:32:32 +0100
commit8c6d0b51c719e1817e308375d129b17ede3b82fc (patch)
tree8aa23d1db5e4198f6aeed5091ad6adedc12fea35 /android
parentMerge pull request #3476 from Seadragon91/patch-1 (diff)
downloadcuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.gz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.bz2
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.lz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.xz
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.tar.zst
cuberite-8c6d0b51c719e1817e308375d129b17ede3b82fc.zip
Diffstat (limited to 'android')
-rw-r--r--android/.gitignore5
-rw-r--r--android/CMakeLists.txt32
2 files changed, 37 insertions, 0 deletions
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 000000000..a9446f022
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,5 @@
+/Cuberite/
+/CMakeFiles/
+/lua_native-prefix/
+/tolua_native-prefix/
+CMakeCache.txt \ No newline at end of file
diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt
new file mode 100644
index 000000000..849b24d04
--- /dev/null
+++ b/android/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Build command:
+# cmake . -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=16 -DCMAKE_BUILD_TYPE=Release -DCMAKE_ANDROID_ARCH_ABI=armeabi -DNATIVE_TOLUA_GENERATOR="" -DCMAKE_ANDROID_NDK=""
+# -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM="" may also be required on Windows
+
+cmake_minimum_required (VERSION 3.7)
+project(Cuberite)
+
+# Set up Android parameters
+add_definitions(-DANDROID)
+set(ANDROID TRUE)
+set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
+
+# We're crosscompiling for Android
+set(NO_NATIVE_OPTIMIZATION TRUE)
+
+# SYSTEM flag to silence warnings for external headers
+include_directories(SYSTEM
+ ../lib/
+ ../src/
+ ../lib/jsoncpp/include/
+ ../lib/polarssl/include/
+ ../lib/sqlitecpp/include/
+ ../lib/sqlitecpp/sqlite3/
+ ../lib/libevent/include/
+)
+
+# Disable some compiler warnings (the lazy way out)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-double-promotion")
+
+# Build the rest of the server
+add_subdirectory(../ Cuberite)