taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 437 forks source link

Add support for libc++, the LLVM C++ Standard Library. #36

Closed matt-langston closed 9 years ago

matt-langston commented 9 years ago

This PR adds support for the LLVM C++ Standard Library reported in #17. My company is using this successfully with the CrystaX NDK (required for boost) for our Android builds. Use it like this:

cmake -DCMAKE_TOOLCHAIN_FILE=android.toolchain.cmake \
-DANDROID_NDK=<ndk_path> \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_ABI="armeabi-v7a" \
-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang3.5 \
-DANDROID_STL=libc++_shared \
<source_path>
cmake --build .

You can also replace -DANDROID_STL=libc++_shared with -DANDROID_STL=libc++_static.

I suggest that this PR supersede PR #33.

taka-no-me commented 9 years ago

This is quite incomplete libc++ support. And as pointed by @abergmeier the naming should be consistent with NDK. So I'm closing this one.