1
function(get_android_flags)
3
set(MIR_NDK_PATH $ENV{MIR_NDK_PATH})
5
#build flags for finding things in the sysroot
6
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} --sysroot=${MIR_NDK_PATH}/sysroot")
7
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -isystem ${MIR_NDK_PATH}/sysroot/usr/include")
8
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -isystem ${MIR_NDK_PATH}/include/c++")
9
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -isystem ${MIR_NDK_PATH}/include/c++/arm-linux-androideabi/armv7-a")
11
#note: this has to go away before landing. works around a STL header problem
12
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpermissive")
14
set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS}" PARENT_SCOPE)
17
set( ANDROID_DEFINITIONS
18
-D_GLIBCXX_HAS_GTHREADS;
19
-D_GLIBCXX_USE_C99_STDINT_TR1;
21
-D_GLIBCXX_USE_SCHED_YIELD;
23
-DHAVE_FUTEX_WRAPPERS=1;
33
-DHAVE_TIMEDWAIT_MONOTONIC;
40
-DHAVE_SCHED_SETSCHEDULER;
43
-DHAVE_LINUX_LOCAL_SOCKET_NAMESPACE=1;
47
-DHAVE_DIRENT_D_TYPE=1;
49
-DOS_SHARED_LIB_FORMAT_STR="lib%s.so";
51
-DMINCORE_POINTER_TYPE="unsigned char *";
53
-DOS_PATH_SEPARATOR='/';
55
-DHAVE_SYS_SOCKET_H=1;
65
-DGTEST_OS_LINUX_ANDROID;
67
-DGTEST_HAS_POSIX_RE=0
73
set(ANDROID_LINKER_FLAGS "-Wl,-rpath,${MIR_NDK_PATH}/sysroot/usr/lib:${MIR_NDK_PATH}/arm-linux-androideabi/lib -lgnustl_shared" PARENT_SCOPE)
75
endfunction(get_android_flags)