Khalid Taha
Khalid Taha

Reputation: 3313

How to execute more than CMakeLists.txt files in android

I have two c++ libraries included in my project, and each has CMakeLists.txt file. What should I add in my build.gradle file to execute them ? I tried the following but it's not working:

cmake {
    path "CMakeLists.txt"
    path "src/main/cpp/fluidsynth/android/CMakeLists.txt"
}

but I have runtime error after I include the library of the first CMakeLists.txt file.

Upvotes: 1

Views: 509

Answers (1)

Georgi Gerganov
Georgi Gerganov

Reputation: 1066

Add add_subdirectory("src/main/cpp/fluidsynth/android/CMakeLists.txt") to your first CMakeLists.txt and remove the second path from the build.gradle file.

Upvotes: 3

Related Questions