Commit 69831c12 authored by Sandro Andrade's avatar Sandro Andrade
Browse files

Handle Csound dependency in Android builds as part of cmake build system

parent f16a023b
......@@ -7,5 +7,3 @@ export ANT=/usr/bin/ant
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk/
export INSTALL_DIR=/home/pdv/install-dir/usr
export CMAKE_SYSROOT=$BASE_DIR/android-ndk-r10e/platforms/android-17/arch-arm/
export CSOUND_ANDROID_ROOT=/home/pdv/tmp/csound-android-6.11.0/
export CSOUND_ROOT=/home/pdv/tmp/csound/
set(CSOUND_LIBS_DIR $ENV{CSOUND_ANDROID_ROOT}/CsoundForAndroid/CsoundAndroid/src/main/jniLibs/armeabi-v7a)
include(ExternalProject)
ExternalProject_Add(CsoundForAndroid
URL https://github.com/csound/csound/releases/download/6.11.0/Csound6.11.0-Android.zip
URL_HASH MD5=f2aeb39b5f227ae19c92f31b23d56342
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
ExternalProject_Add(Csound
GIT_REPOSITORY https://github.com/csound/csound.git
GIT_TAG 6.11.0
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
find_library(CSOUND_ANDROID NAMES libcsoundandroid.so HINTS ${CSOUND_LIBS_DIR} CMAKE_FIND_ROOT_PATH_BOTH NO_DEFAULT_PATH)
find_library(CSOUND_SHARED NAMES libc++_shared.so HINTS ${CSOUND_LIBS_DIR} CMAKE_FIND_ROOT_PATH_BOTH NO_DEFAULT_PATH)
find_library(CSOUND_SND NAMES libsndfile.so HINTS ${CSOUND_LIBS_DIR} CMAKE_FIND_ROOT_PATH_BOTH NO_DEFAULT_PATH)
set(CSOUND_ANDROID_LIBS_DIR ${CMAKE_CURRENT_BINARY_DIR}/CsoundForAndroid-prefix/src/CsoundForAndroid/CsoundForAndroid/CsoundAndroid/src/main/jniLibs/armeabi-v7a)
set(CSOUND_ROOT ${CMAKE_CURRENT_BINARY_DIR}/Csound-prefix/src/Csound/)
set(CSOUND_ANDROID ${CSOUND_ANDROID_LIBS_DIR}/libcsoundandroid.so)
set(CSOUND_SHARED ${CSOUND_ANDROID_LIBS_DIR}/libc++_shared.so)
set(CSOUND_SND ${CSOUND_ANDROID_LIBS_DIR}/libsndfile.so)
set(CSOUND_LIBS ${CSOUND_ANDROID} ${CSOUND_SHARED} ${CSOUND_SND})
include_directories($ENV{CSOUND_ROOT}/include)
include_directories($ENV{CSOUND_ROOT}/Android/CsoundAndroid/jni/)
include_directories(${CSOUND_ROOT}/include)
include_directories(${CSOUND_ROOT}/Android/CsoundAndroid/jni/)
set(csoundsoundcontroller_PLUGIN_SRCS
csengine.cpp
......@@ -23,8 +42,6 @@ target_link_libraries(minuetcsoundsoundcontroller
${CSOUND_LIBS}
)
target_link_libraries(minuetcsoundsoundcontroller ${CSOUND_LIBS})
IF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Android")
install(TARGETS minuetcsoundsoundcontroller DESTINATION ${PLUGIN_INSTALL_DIR}/minuet/)
ENDIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Android")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment