mirror of https://github.com/microsoft/vcpkg.git
[vcpkg] Update android usage documentation (#23690)
* [doc] triplet creation is not needed any more for android. The metioned triplets are already commited on master branch. There is no need to create triplet files for android. This doc is kind of outdated. I tried without the triplet creation stelp and jsoncpp installation is successful. * [doc] keep android triplet to ABI mapping table Co-authored-by: Jonliu1993 <13720414433@163.com>
This commit is contained in:
parent
9c5dcd6afe
commit
97298f2ede
|
|
@ -30,10 +30,7 @@ export ANDROID_NDK_HOME=/home/your-account/Android/android-ndk-r21b
|
|||
export VCPKG_ROOT=/path/to/vcpkg
|
||||
````
|
||||
|
||||
## Create the android triplets
|
||||
|
||||
|
||||
### Android ABI and corresponding vcpkg triplets
|
||||
## vcpkg triplets and their corresponding android ABI
|
||||
|
||||
There are four different Android ABI, each of which maps to
|
||||
a vcpkg triplet. The following table outlines the mapping from vcpkg architectures to android architectures
|
||||
|
|
@ -45,41 +42,6 @@ a vcpkg triplet. The following table outlines the mapping from vcpkg architectur
|
|||
|x64-android | x86_64 |
|
||||
|x86-android | x86 |
|
||||
|
||||
### Create the android triplets
|
||||
You can copy-paste the script below to populate them, and adjust them to your needs if required.
|
||||
|
||||
````bash
|
||||
cd $VCPKG_ROOT
|
||||
|
||||
echo "
|
||||
set(VCPKG_TARGET_ARCHITECTURE arm)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Android)
|
||||
" > triplets/community/arm-android.cmake
|
||||
|
||||
echo "
|
||||
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Android)
|
||||
" > triplets/community/arm64-android.cmake
|
||||
|
||||
echo "
|
||||
set(VCPKG_TARGET_ARCHITECTURE x86)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Android)
|
||||
" > triplets/community/x86-android.cmake
|
||||
|
||||
echo "
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Android)
|
||||
" > triplets/community/x64-android.cmake
|
||||
````
|
||||
|
||||
## Install libraries for Android using vcpkg
|
||||
|
||||
Example for jsoncpp:
|
||||
|
|
|
|||
Loading…
Reference in New Issue