1# Adapt the pathnames in this file to suit your needs
2
3# The path to the directory that contains your cross-compiled dependency
4# libraries (boost, and optionally others such as graphicsmagick, ssl, ...)
5SET(ANDROID_STAGING_DIR /home/pieter/soft/android/ndk-r5b-api8-staging)
6
7# The path to your Android SDK installation
8SET(ANDROID_SDK_DIR /home/pieter/soft/android/android-sdk-linux_x86)
9
10# The ID of the target must be compatible with the NDK used to build Wt.
11# Target ID's are specific to your installation; to discover your target ID,
12# use 'android list target'. The default value of 99 is chosen to ensure
13# that you will verify this.
14SET(ANDROID_SDK_TARGET_ID 99)
15
16# The path to your standalone toolchain directory.
17# See docs/STANDALONE-TOOLCHAIN.html in your ndk's installation dir
18SET(ANDROID_NDK_TOOLS_DIR /home/pieter/soft/android/ndk-r5b-api8)
19
20# Below is the normal contents of a cmake toolchain file, you'll
21# probably not need to modify it.
22
23SET(TARGET_CC ${ANDROID_NDK_TOOLS_DIR}/bin/arm-linux-androideabi-gcc)
24SET(TARGET_CXX ${ANDROID_NDK_TOOLS_DIR}/bin/arm-linux-androideabi-g++)
25SET(ANDROID_STRIP ${ANDROID_NDK_TOOLS_DIR}/bin/arm-linux-androideabi-strip)
26
27SET(CMAKE_CXX_FLAGS "-fpic -ffunction-sections -funwind-tables -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__  -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID  -Wa,--noexecstack")
28
29# this one is important
30SET(CMAKE_SYSTEM_NAME Linux)
31
32#this one not so much
33SET(CMAKE_SYSTEM_VERSION 1)
34
35# specify the cross compiler
36SET(CMAKE_C_COMPILER ${TARGET_CC})
37
38SET(CMAKE_CXX_COMPILER ${TARGET_CXX})
39
40# where is the target environment
41SET(CMAKE_FIND_ROOT_PATH ${ANDROID_NDK_TOOLS_DIR} ${ANDROID_STAGING_DIR})
42
43# search for programs in the build host directories
44SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
45# for libraries and headers in the target directories
46SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
47SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
48
49