I have an Android project that uses NDK. I will like to include the opus <https://opus-codec.org/downloads/> 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 Android.mk file so I want to do something similar with CMake. Is it possible to include local sources in CMake and specify an Android.mk file that will be used to build such sources. Best, NB: Here's my current ExternalProject_Add definition: ExternalProject_Add(project_opus URL https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> BUILD_COMMAND make INSTALL_COMMAND make install) ExternalProject_Get_Property(project_opus install_dir) include_directories(${install_dir}/include) add_library(opus SHARED IMPORTED) add_dependencies(opus project_opus) target_link_libraries( # Specifies the target library. native-lib # Links the target library to the log library # included in the NDK. ${log-lib} opus oboe OpenSLES)
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake