diff options
author | Sven Gothel <[email protected]> | 2014-02-15 02:50:13 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-02-15 02:50:13 +0100 |
commit | 4b0fce521472bc30a539a252f83289dd1c32cb9e (patch) | |
tree | ece1623c891eb1cdd2be96b612abb06c1fcc5f72 /cmake | |
parent | e9208977d09972e81e5dac9e196199b4e28244e8 (diff) |
cmake/toolchain.android.cmake: Add CXX_FLAGS and add -I${ANDROID_NDK_SYSROOT}/usr/include
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/toolchain.android.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/toolchain.android.cmake b/cmake/toolchain.android.cmake index 7ed01286..70aa6248 100644 --- a/cmake/toolchain.android.cmake +++ b/cmake/toolchain.android.cmake @@ -88,6 +88,7 @@ if(EXISTS "${ANDROID_NDK}") set(ANDROID_NDK_SYSROOT "${ANDROID_NDK}/platforms/android-${ANDROID_API_LEVEL}/arch-${ANDROID_TOOLCHAIN_PLATFORM_NAME}") set(ANDROID_NDK_TOOLCHAIN_ROOT "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}-${ANDROID_TOOLCHAIN_VERSION}/prebuilt/${ANDROID_TOOLCHAIN_SYSTEM}") + endif() set(CMAKE_C_COMPILER "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_PREFIX}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "gcc" FORCE) @@ -127,7 +128,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_C_FLAGS "-fPIC -DANDROID -Wno-psabi -fsigned-char") +set(CMAKE_C_FLAGS "-fPIC -DANDROID -Wno-psabi -fsigned-char -I${ANDROID_NDK_SYSROOT}/usr/include") +set(CMAKE_CXX_FLAGS "-fPIC -DANDROID -Wno-psabi -fsigned-char -I${ANDROID_NDK_SYSROOT}/usr/include") set(FORCE_ARM OFF CACHE BOOL "Use 32-bit ARM instructions instead of Thumb-1") if(NDK_CPU_X86) |