Reputation: 6624
When configuring a project to add C and C++ in an Android project a few things come up in a project's directory tree.
There's the cpp
, jniLibs
, and the jni
directories.
There are also android.mk
and CMakeLists.txt
files.
What are the purposes \ what should be included in the cpp
, jniLibs
, and the jni
directories?
Do android.mk
and CMakeLists.txt
work interchangeably?
Thank you all in advance.
Upvotes: 0
Views: 186
Reputation: 1507
cpp
is a directory where you put your cpp
code.
jniLibs
is an optional directory, can be added if you need to include some external libs
(.so files).
CMakeLists.txt is a configuration file for CMake, which is a build tool for c++
code.
android.mk is a configuration file used to build cpp code, similar to GNU makefile. No longer used now, replaced by CMake
tool. You should use CMake
now instead of android.mk
, but you can still used if you want.
CMakeLists.txt
is a replacement of the old way android.mk
Upvotes: 1