include(ExternalProject)

set(OPUS_VERSION "1.6.1")

ExternalProject_Add(
  opus SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/opus GIT_REPOSITORY https://github.com/xiph/opus GIT_TAG v1.6.1
  DOWNLOAD_EXTRACT_TIMESTAMP OFF GIT_SHALLOW TRUE
  CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${DEPS_INSTALL_DIR}
             -DCMAKE_INSTALL_LIBDIR:STRING=${CMAKE_INSTALL_LIBDIR} -DOPUS_BUILD_PROGRAMS:BOOL=OFF
             -DOPUS_BUILD_TESTING:BOOL=OFF -DOPUS_BUILD_SHARED_LIBRARY:BOOL=ON
)
