add a BUILD_ANDROID guide, reference ANDROID_LIB_DIR

This commit is contained in:
Stephen Birarda 2015-01-19 10:53:17 -08:00
parent 10be0ee984
commit 14e4879154
2 changed files with 19 additions and 4 deletions

15
BUILD_ANDROID.md Normal file
View file

@ -0,0 +1,15 @@
Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only Android specific instructions are found in this file.
###Android Dependencies
There are no Android specific dependencies to build hifi. However, you will need to compile the dependencies required for all platforms for Android, and help CMake find these compiled libraries on your machine.
####ANDROID_LIB_DIR
Since you won't be installing Android dependencies to system paths on your development machine, CMake will need a little help tracking down your Android dependencies.
This is most easily accomplished by installing all Android dependencies in the same folder. You can place this folder wherever you like on your machine. In this build guide and across our CMakeLists files this folder is referred to as ANDROID_LIB_DIR. You can set ANDROID_LIB_DIR in your environment or by passing when you run CMake.
####Qt
While the current build guide states we are using Qt 5.3.0, the Android build uses 5.4.0. This is because Qt Android support is newer and more likely to be receiving important bug fixes between versions.
Install Qt 5.4.0 for Android for your host environment from the [Qt downloads page](http://www.qt.io/download/). Install Qt to $ANDROID_LIB_DIR/Qt. This is required so that our root CMakeLists file can help CMake find your Android Qt installation.

View file

@ -58,8 +58,8 @@ if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --stdlib=libc++")
endif ()
if (NOT HIFI_ANDROID)
set(HIFI_ANDROID $ENV{HIFI_ANDROID})
if (NOT ANDROID_LIB_DIR)
set(ANDROID_LIB_DIR $ENV{ANDROID_LIB_DIR})
endif ()
if (ANDROID)
@ -69,8 +69,8 @@ if (ANDROID)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
if (HIFI_ANDROID)
list(APPEND CMAKE_FIND_ROOT_PATH ${HIFI_ANDROID})
if (ANDROID_LIB_DIR)
list(APPEND CMAKE_FIND_ROOT_PATH ${ANDROID_LIB_DIR})
endif ()
else ()
if (NOT QT_CMAKE_PREFIX_PATH)