[CMake] Tegra NSight shared libraries not copied into apk

Max Savenkov max.savenkov at gmail.com
Wed Apr 29 12:00:54 EDT 2015


When I specify a shared library via target_link_libraries, it gets
added to Linker options and is linked. But when the final APK is
assembled, specified shared library does not get copied into it (into
lib\armeabi-v7a directory), and therefore I get an error after launch,
because loadLibrary cannot find it.

To mark a shared library file to be copied into APK, it should be
specified in Ant Build -> Additional Dependendies -> Native Library
Dependencies. As far as I can see, the current implementation of
generator has no way of doing it. Could such an option to be added? It
would probably be right just to add all .so files added with
target_link_libraries to this property (and their directories into
Native Library Directories).

Or am I missing something? Is there any way to solve this in other way?


More information about the CMake mailing list