diff options
author | Mat <mail@mathias.is> | 2020-05-10 18:18:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 18:18:28 +0200 |
commit | e053f72db824a16c1cb59107315001473058e2bc (patch) | |
tree | c54dafbc0048939697cb6ec7a8034534738bdbed /android | |
parent | Cleanup some workarounds and warnings (#4735) (diff) | |
download | cuberite-e053f72db824a16c1cb59107315001473058e2bc.tar cuberite-e053f72db824a16c1cb59107315001473058e2bc.tar.gz cuberite-e053f72db824a16c1cb59107315001473058e2bc.tar.bz2 cuberite-e053f72db824a16c1cb59107315001473058e2bc.tar.lz cuberite-e053f72db824a16c1cb59107315001473058e2bc.tar.xz cuberite-e053f72db824a16c1cb59107315001473058e2bc.tar.zst cuberite-e053f72db824a16c1cb59107315001473058e2bc.zip |
Diffstat (limited to 'android')
-rw-r--r-- | android/CMakeLists.txt | 21 | ||||
-rwxr-xr-x | android/compile.sh | 2 |
2 files changed, 5 insertions, 18 deletions
diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt index 51df60cdc..408c416d1 100644 --- a/android/CMakeLists.txt +++ b/android/CMakeLists.txt @@ -1,28 +1,15 @@ -cmake_minimum_required (VERSION 3.7) +cmake_minimum_required (VERSION 3.12.4) 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 -Wno-sign-conversion -Wno-unused-command-line-argument -s") - # Build the rest of the server add_subdirectory(../ Cuberite) + +# Strip debug symbols to reduce binary size +set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE -s) diff --git a/android/compile.sh b/android/compile.sh index 0fee304cf..632026d40 100755 --- a/android/compile.sh +++ b/android/compile.sh @@ -4,7 +4,7 @@ set -e # This script cross-compiles cuberite for the android platform. It uses # the following enviroment variables -# CMAKE: Should be the path to a cmake executable of version 3.7+ +# CMAKE: Should be the path to a cmake executable of version 3.12.4+ # NDK: Should be the path to the android ndk root # (optional) TYPE: either Release or Debug, sets the build type # (optional) THREADS: The number of threads to use, default 4 |