-
Notifications
You must be signed in to change notification settings - Fork 191
Add android toolchains #10
Comments
Initial android-cmake toolchain pushed to polly/android branch as-is to get things going. |
Thanks, merged e670b4c |
OpenCV Android toolchain: https://github.com/Itseez/opencv/blob/master/platforms/android/android.toolchain.cmake |
After looking at the diff, that seems to be a better starting point. I'll
On Mon, May 4, 2015 at 12:42 PM, Ruslan Baratov notifications@github.com
|
CMake target properties: |
one more example: https://github.com/Discordia/android-cmake-example |
Merge f930e10 allows the toolchain to be used with hunter. However there are still a few bits missing for the toolchain file in general: I updated on my repo a fix for this: f85df73 by creating an ANDROID_STL_LIB_DIR and adding it to the ANDROID_LINKER_FLAGS if gnustl_static is chosen, but would be nice to hear from whoever uses other options for ANDROID_STL on a better solution to deal with this. ping @headupinclouds EDIT: Maybe it is a bad idea to hardwire the ANDROID_STL on the ANDROID_LINKER_FLAGS (ANDROID_LINKER_FLAGS sets the value for CMAKE_EXE_LINKER_FLAGS, CMAKE_SHARED_LINKER_FLAGS and CMAKE_STATIC_LINKER_FLAGS) but ANDROID_STL_LIB_DIR should be useful to know where the directory of the lib for the chosen STL is. |
I've removed Can be used by Hunter: https://github.com/ruslo/hunter/wiki/pkg.android.modules |
@headupinclouds f89ebf3 I think https://github.com/taka-no-me/android-cmake is the original repo so probably version from OpenCV is older. So I guess we can move |
@ruslo Agreed. It looks like the taka-no-me repository is actively being updated ("authored 10 days ago"). I like the idea of using this one, since it will probably be easier to push and pull changes from upstream as needed. |
I've added Switch between different Simple examples compile fine: https://github.com/ruslo/polly/tree/master/examples |
Guys, if you are going to revert to that toolchain, please be sure that it sets CMAKE_AR CMAKE_ANDROID_API And be aware that CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU ) sets the forced compiler which makes hunter fail. |
I'm planning to cherry-pick your changes |
Sorry, I didn't mean CMAKE_AR, make sure it sets CMAKE_C_PROCESSOR is what I meant - sorry, I wrote it in a hurry. Anyway, as discussed in #16 (comment) it makes sense that these changes go to upstream and be reviewed by people who have been maintaining this file longer. |
This has been taken care of with the following pull request: taka-no-me/android-cmake#53 |
Usage example: https://github.com/forexample/android-cmake |
Well, looks like there is no need to create APK to run executable on device. It's possible to create simple console application and run it using
|
https://code.google.com/p/android-cmake/
The text was updated successfully, but these errors were encountered: