https://github.com/atkawa7/prefab-vpkg-integration-sample
An example project to show integration with vcpkg and prefab
https://github.com/atkawa7/prefab-vpkg-integration-sample
android native-library prefab sample samples vcpkg
Last synced: 2 months ago
JSON representation
An example project to show integration with vcpkg and prefab
- Host: GitHub
- URL: https://github.com/atkawa7/prefab-vpkg-integration-sample
- Owner: atkawa7
- Created: 2020-03-02T09:31:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-02T10:54:54.000Z (over 5 years ago)
- Last Synced: 2025-03-30T07:31:58.085Z (7 months ago)
- Topics: android, native-library, prefab, sample, samples, vcpkg
- Language: Java
- Homepage:
- Size: 132 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Prefab Vpkg Integration Sample
## Checkout getting started on vcpkg https://github.com/microsoft/vcpkg
*** This requires android studio version 4.0 and above***
### install all support android triplets for a package.
```
vcpkg install jsoncpp --triplet arm64-android
vcpkg install jsoncpp --triplet arm-android
vcpkg install jsoncpp --triplet x64-android
vcpkg install jsoncpp --triplet x86-android
```### Then export using the following.
```
vcpkg export jsoncpp --triplet x86-android --prefab```
In app/build.gradle
Add files
```
implementation 'com.vcpkg.ndk.support:jsoncpp:1.9.2'
```And cmake flags
```
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_shared'
cppFlags "-std=c++17"
}
}
```In gradle.properties
```
# Enables Prefab
android.enablePrefab=true
# Work around https://issuetracker.google.com/149575364
android.enableParallelJsonGen=false
# 4.0.0 canary 9 defaults to Prefab 1.0.0-alpha3, which is not the latest.
android.prefabVersion=1.0.0-alpha5
```