micknoise / Maximilian

C++ Audio and Music DSP Library

Home Page:http://www.maximilian.strangeloop.co.uk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maximilian for Android Studio?

MKZwei opened this issue · comments

Hello Mick,

is it possible to use the Maximilan DSP library for Android Systems? In your description Android was not mentioned.
I thought it would be possible to import Maximilan into Android by adding an appropriate CMakeLists.txt file to your repository.
I am not really familiar with CMake and failed by writing my own CMakeLists.txt. The code reads as follows:


cmake_minimum_required(Version 3.4.1)

project(maximilian)

set(max_sources
src/libs/fft.cpp
src/libs/maxiAtoms.cpp
src/libs/maxiBark.cpp
src/libs/maxiConvolve.cpp
src/libs/maxiFFT.cpp
src/libs/maxiGrains.cpp
src/libs/maxiMFCC.cpp
src/libs/maxiReverb.cpp
src/libs/maxiSynths.cpp
src/libs/stb_vorbis.c
src/maximilian.cpp
src/maximilian.embind.cpp
)

add_library(maximilian ${max_sources})

Specify directories which the compiler should look for headers

target_include_directories(
PRIVATE src)

Compile Flags:

Enable -Werror when building debug config

Enable -Ofast

target_compile_options(maximilian
PRIVATE
-std=c++14
-Wall
-Wextra-semi
-Wshadow
-Wshadow-field
-Ofast
"$<$CONFIG:DEBUG:-Werror>")

Enable logging of D,V for debug builds

target_compile_definitions(Maximilian PUBLIC $<$CONFIG:DEBUG:MAXIMILIAN_ENABLE_LOGGING=1>)

When installing Maximilian put the libraries in the lib/ folder e.g. lib/arm64-v8a

install(TARGETS maximilian
LIBRARY DESTINATION lib/${ANDROID_ABI}
ARCHIVE DESTINATION lib/${ANDROID_ABI})


Best regards
Jay