Skip to content

Commit

Permalink
Update hello-cdep to include all ABIs
Browse files Browse the repository at this point in the history
  • Loading branch information
ggfan committed May 17, 2017
1 parent 763de3d commit f45281b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions hello-cdep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This sample uses the new [Android Studio CMake plugin](http://tools.android.com/
* How to use external pre-build libs packed inside [CDep](https://github.com/google/cdep) package

Refer to [CDep documentation](http://github.com/google/cdep/blob/master/README.md)
The lib binaries and header files are hosted in [temporary repo](https://github.com/ggfan/hello-libs), this sample use
The lib binaries and header files are hosted in [temporary repo](https://github.com/ggfan/hello-CDep/releases), this sample uses
[CDep](https://github.com/google/cdep) to pull it into Android Studio's [cmake](https://cmake.org/documentation) script.

Pre-requisites
Expand All @@ -19,7 +19,10 @@ Getting Started
1. [Download Android Studio](http://developer.android.com/sdk/index.html)
1. Launch Android Studio.
1. Download cdep dependences:
* inside terminal, cd ${PROJECT_DIR}; ./cdep
* inside terminal
```
cd ${PROJECT_DIR}; ./cdep
```
1. Open the sample directory.
1. Open *File/Project Structure...*
- Click *Download* or *Select NDK location*.
Expand Down
3 changes: 1 addition & 2 deletions hello-cdep/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ android {
versionCode = 1
versionName = '1.0'
ndk {
//TODO: add support x86
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
externalNativeBuild {
cmake {
Expand Down
2 changes: 1 addition & 1 deletion hello-cdep/app/src/main/cpp/hello-cdep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


#define LOGI(...) \
((void)__android_log_print(ANDROID_LOG_INFO, "hell-libs::", __VA_ARGS__))
((void)__android_log_print(ANDROID_LOG_INFO, "hell-cdep::", __VA_ARGS__))

/* This is a trivial JNI example where we use a native method
* to return a new VM String. See the corresponding Java source
Expand Down
2 changes: 1 addition & 1 deletion hello-cdep/cdep.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
builders: [cmake]

dependencies:
- compile: com.github.ggfan:hello-libs:0.0.0
- compile: com.github.ggfan:hello-cdep:1.0.0

0 comments on commit f45281b

Please sign in to comment.