Hi Robert, If you want, check out the excellent "android-cmake" project for some tips. It covers a lot of different scenarios for Android: https://code.google.com/p/android-cmake/
I put together a simple function to generate an APK from CMake: https://github.com/arpg/rpg-cmake/blob/master/def_apk.cmake It handles generating the Android.mk, running NDK-build and driving ant. You can see an example of its use here: https://github.com/arpg/AndroidSensorApp/blob/master/android-sensor-app/CMakeLists.txt Hope this helps! Cheers, Jack On Tue, May 6, 2014 at 10:09 AM, J Decker <d3c...@gmail.com> wrote: > once you have your libraries and java souces... need to put them in an > arrangement like the ndk-build script expects (in libs, src, res) and have > a build.xml and a androidManifest.xml > then just call > > ant <debug/release> > > this does the packaging, and results in a bin/<build.xml packgae > name>-<debug/releease>.apk > > the next useful commands are > adb install <apk name> > adb uninstall <AndroidManifest package name> > > > > > On Tue, May 6, 2014 at 6:55 AM, Robert Dailey <rcdailey.li...@gmail.com>wrote: > >> Hello, >> >> I have been working on getting CMake working for Android projects. So >> far, I have a custom toolchain file to build NDK libraries. I am also >> able to generate makefiles for Eclipse, import those projects into >> eclipse, and build from eclipse. All seems to be working fine from >> that aspect. >> >> The only part missing is the Java build. I need to build a Java >> project and link against the .SO files generated from the NDK library >> builds. >> >> Can someone help me figure out how to integrate this into CMake? Do I >> need to have a set of pre-generated java project files (ANT)? Do I >> need to use 'android create project' inside my CMake scripts to >> generate them on the fly? >> >> I'm not sure exactly how to plug in the Java piece of the build >> process. I'm not familiar with Android development completely, so >> detailed directions will be immensely helpful! >> -- >> >> Powered by www.kitware.com >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Kitware offers various services to support the CMake community. For more >> information on each offering, please visit: >> >> CMake Support: http://cmake.org/cmake/help/support.html >> CMake Consulting: http://cmake.org/cmake/help/consulting.html >> CMake Training Courses: http://cmake.org/cmake/help/training.html >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Follow this link to subscribe/unsubscribe: >> http://www.cmake.org/mailman/listinfo/cmake >> > > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake