Per Brad's suggestion, I removed this line from my CMakeLists.txt: add_library(${PROJECT_NAME} SHARED ${SRC_LIST})
And I added these lines: set(CMAKE_ANDROID_GUI TRUE) set(CMAKE_ANDROID_API 19) # Kindle Fire HD 6 set(CMAKE_ANDROID_API_MIN 19) # Kindle Fire HD 6 add_executable(${PROJECT_NAME} ${SRC_LIST}) I am now able to generate a Visual Studio 2010 pemDemos.sln that includes a pemDemos.vcxproj with a configuration properties section "Ant Built". From inside Visual Studio, I'm able to build an APK and then ctrl+F5 to run it on my device. Unfortunately, cmake did not generate AndroidManifest.xml, so I had to supply my own using the aforementioned execute_process() with android.bat. At this point my app just displays a "Hello World, PemActivity" message that it gets from "build-android\android\res\layout\main.xml". So it's not using "android_native_app_glue.c,h" to point to my "main.cpp" code in "libpemDemos.so" yet. So maybe cmake doesn't do that part automatically for me? I also don't see a tutorial or simple hello world demo project for this... However, I can at least use AndroidNativeApp.vcxproj as a reference. thank you & best regards On Mon, Aug 24, 2015 at 9:49 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/23/2015 04:44 PM, Peter List wrote: > > How do I tell cmake to include "Ant Build" in my vcxproj, so that > > it will package my project into an APK? I can generate vcxproj > > that builds a Tegra-Android *.so file, but it does not build me > > an APK, and my vcxproj is missing the "Ant Build" property section. > > You need to set the ANDROID_GUI target property on an exe: > > http://www.cmake.org/cmake/help/v3.3/prop_tgt/ANDROID_GUI.html > > Additional settings have been added in post-3.3 development: > > VS: Add more Nsight Tegra generator Android property settings > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c0afaf4 > > -Brad > >
-- 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://public.kitware.com/mailman/listinfo/cmake-developers