Use ExternalProject_Add to include Opus in Android

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Use ExternalProject_Add to include Opus in Android

Yusuf Kaba

I have an Android project that uses NDK. I will like to include the opus source code in the native code. I have tried using the ExternalProject_Add property of CMake but my native code still cannot import headers from the Opus library and fails to build.

Some of my native classes are dependent on the Opus source code. I was able to include the Opus source using by adding a Makefile to the source and including that in the file so I want to do something similar with CMake. Is it possible to include local sources in CMake and specify an file that will be used to build such sources.


NB: Here's my current ExternalProject_Add definition:

  INSTALL_COMMAND make install

ExternalProject_Get_Property(project_opus install_dir)

add_library(opus SHARED IMPORTED)
add_dependencies(opus project_opus)

target_link_libraries( # Specifies the target library.

                       # Links the target library to the log library
                       # included in the NDK.
                       ${log-lib} opus oboe OpenSLES)


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: