20 if [[ "${TRAVIS_OS_NAME}" == "linux" && -z "${BUILD_ANDROID}" ]]; then
21 # Install pulseaudio, portaudio, ALSA, JACK dependencies for
22 # corresponding backends.
23 # Install Qt5 dependency for alsoft-config.
24 sudo apt-get install -qq \
33 if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
34 curl -o ~/android-ndk.zip https://dl.google.com/android/repository/android-ndk-r21-linux-x86_64.zip
35 unzip -q ~/android-ndk.zip -d ~ \
36 'android-ndk-r21/build/cmake/*' \
37 'android-ndk-r21/build/core/toolchains/arm-linux-androideabi-*/*' \
38 'android-ndk-r21/platforms/android-16/arch-arm/*' \
39 'android-ndk-r21/source.properties' \
40 'android-ndk-r21/sources/android/support/include/*' \
41 'android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/*' \
42 'android-ndk-r21/sources/cxx-stl/llvm-libc++/include/*' \
43 'android-ndk-r21/sysroot/*' \
44 'android-ndk-r21/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/*' \
45 'android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/*'
46 export OBOE_LOC=~/oboe
47 git clone --depth 1 -b 1.3-stable https://github.com/google/oboe "$OBOE_LOC"
50 if [[ "${TRAVIS_OS_NAME}" == "freebsd" ]]; then
51 # Install Ninja as it's used downstream.
52 # Install dependencies for all supported backends.
53 # Install Qt5 dependency for alsoft-config.
54 # Install ffmpeg for examples.
73 if [[ "${TRAVIS_OS_NAME}" == "linux" && -z "${BUILD_ANDROID}" ]]; then
75 -DALSOFT_REQUIRE_ALSA=ON \
76 -DALSOFT_REQUIRE_OSS=ON \
77 -DALSOFT_REQUIRE_PORTAUDIO=ON \
78 -DALSOFT_REQUIRE_PULSEAUDIO=ON \
79 -DALSOFT_REQUIRE_JACK=ON \
80 -DALSOFT_EMBED_HRTF_DATA=YES \
84 if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
86 -DANDROID_STL=c++_shared \
87 -DCMAKE_TOOLCHAIN_FILE=~/android-ndk-r21/build/cmake/android.toolchain.cmake \
88 -DOBOE_SOURCE="$OBOE_LOC" \
89 -DALSOFT_REQUIRE_OBOE=ON \
90 -DALSOFT_REQUIRE_OPENSL=ON \
91 -DALSOFT_EMBED_HRTF_DATA=YES \
95 if [[ "${TRAVIS_OS_NAME}" == "freebsd" ]]; then
97 -DALSOFT_REQUIRE_ALSA=ON \
98 -DALSOFT_REQUIRE_JACK=ON \
99 -DALSOFT_REQUIRE_OSS=ON \
100 -DALSOFT_REQUIRE_PORTAUDIO=ON \
101 -DALSOFT_REQUIRE_PULSEAUDIO=ON \
102 -DALSOFT_REQUIRE_SDL2=ON \
103 -DALSOFT_REQUIRE_SNDIO=ON \
104 -DALSOFT_EMBED_HRTF_DATA=YES \
108 if [[ "${TRAVIS_OS_NAME}" == "osx" && -z "${BUILD_IOS}" ]]; then
110 -DALSOFT_REQUIRE_COREAUDIO=ON \
111 -DALSOFT_EMBED_HRTF_DATA=YES \
115 if [[ "${TRAVIS_OS_NAME}" == "osx" && "${BUILD_IOS}" == "true" ]]; then
118 -DCMAKE_SYSTEM_NAME=iOS \
119 -DALSOFT_OSX_FRAMEWORK=ON \
120 -DALSOFT_REQUIRE_COREAUDIO=ON \
121 -DALSOFT_EMBED_HRTF_DATA=YES \
122 "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64" \
125 - cmake --build . --clean-first