0

Say you have a collection of source files:

s1.c
s2.c
s3.c
s4.c
s5.c
s6.c

prebuilt shared libraries:

sh1.so
sh2.so
sh3.so

and prebuilt static libraries:

st1.a
st2.a
st3.a

The task is to create a cmakelist file which does the following:

  1. Builds a shared library called app.so which is loaded using System.LoadLibrary when the application is run

  2. Builds a shared library called app_sh1.so which is automatically placed in src/main/jniLibs after being built

  3. Builds a shared library called app_sh2.so which is automatically placed in src/main/jniLibs after being built

  4. app.so is composed of s1.c, s2.c sh1.so and st1.a

  5. app_sh1.so is composed of s3.c, s4.c, sh2.so and st2.a

  6. app_sh2.so is composed of s5.c, s6.c, sh3.so and st3.a

How do I accomplish this?

user1884325
  • 2,530
  • 1
  • 30
  • 49
  • `2` and `3` point are same except for the share library file name – Chandan Feb 24 '22 at 18:22
  • check this post i think its the same thing: https://stackoverflow.com/questions/49711514/building-c-projects-which-have-cmake-build-files-for-android-using-ndk – Ali Momeni Feb 26 '22 at 07:53

0 Answers0