1
0
cuberite-2a/android/CMakeLists.txt
Alexander Harkness bf10b56638 Fix android builds (#4432)
* Terminate android build script early if any step fails

* Remove deprecated android types

* Use android NDK cmake support rather than cmake android NDK support as that support is better supported

* Android uses GNU strerror_r?

* Fix compilation

* Rebase

* Fix final issues

* Drop submodule changes

* Revert change

* Parentheses

* Lower api levels

* Don't use GNU strerror_r for Android

Co-authored-by: Mat <mail@mathias.is>
2020-01-02 03:54:40 +02:00

29 lines
742 B
CMake

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 -Wno-sign-conversion")
# Build the rest of the server
add_subdirectory(../ Cuberite)