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 \
32 if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
33 curl -o ~/android-ndk.zip https://dl.google.com/android/repository/android-ndk-r21-linux-x86_64.zip
34 unzip -q ~/android-ndk.zip -d ~ \
35 'android-ndk-r21/build/cmake/*' \
36 'android-ndk-r21/build/core/toolchains/arm-linux-androideabi-*/*' \
37 'android-ndk-r21/platforms/android-16/arch-arm/*' \
38 'android-ndk-r21/source.properties' \
39 'android-ndk-r21/sources/android/support/include/*' \
40 'android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/*' \
41 'android-ndk-r21/sources/cxx-stl/llvm-libc++/include/*' \
42 'android-ndk-r21/sysroot/*' \
43 'android-ndk-r21/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/*' \
44 'android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/*'
45 export OBOE_LOC=~/oboe
46 git clone --depth 1 -b 1.3-stable https://github.com/google/oboe "$OBOE_LOC"
49 if [[ "${TRAVIS_OS_NAME}" == "freebsd" ]]; then
50 # Install Ninja as it's used downstream.
51 # Install dependencies for all supported backends.
52 # Install Qt5 dependency for alsoft-config.
53 # Install ffmpeg for examples.
72 if [[ "${TRAVIS_OS_NAME}" == "linux" && -z "${BUILD_ANDROID}" ]]; then
74 -DALSOFT_REQUIRE_ALSA=ON \
75 -DALSOFT_REQUIRE_OSS=ON \
76 -DALSOFT_REQUIRE_PORTAUDIO=ON \
77 -DALSOFT_REQUIRE_PULSEAUDIO=ON \
78 -DALSOFT_REQUIRE_JACK=ON \
79 -DALSOFT_EMBED_HRTF_DATA=YES \
83 if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD_ANDROID}" == "true" ]]; then
85 -DANDROID_STL=c++_shared \
86 -DCMAKE_TOOLCHAIN_FILE=~/android-ndk-r21/build/cmake/android.toolchain.cmake \
87 -DOBOE_SOURCE="$OBOE_LOC" \
88 -DALSOFT_REQUIRE_OBOE=ON \
89 -DALSOFT_REQUIRE_OPENSL=ON \
90 -DALSOFT_EMBED_HRTF_DATA=YES \
94 if [[ "${TRAVIS_OS_NAME}" == "freebsd" ]]; then
96 -DALSOFT_REQUIRE_ALSA=ON \
97 -DALSOFT_REQUIRE_JACK=ON \
98 -DALSOFT_REQUIRE_OSS=ON \
99 -DALSOFT_REQUIRE_PORTAUDIO=ON \
100 -DALSOFT_REQUIRE_PULSEAUDIO=ON \
101 -DALSOFT_REQUIRE_SDL2=ON \
102 -DALSOFT_REQUIRE_SNDIO=ON \
103 -DALSOFT_EMBED_HRTF_DATA=YES \
107 if [[ "${TRAVIS_OS_NAME}" == "osx" && -z "${BUILD_IOS}" ]]; then
109 -DALSOFT_REQUIRE_COREAUDIO=ON \
110 -DALSOFT_EMBED_HRTF_DATA=YES \
114 if [[ "${TRAVIS_OS_NAME}" == "osx" && "${BUILD_IOS}" == "true" ]]; then
117 -DCMAKE_SYSTEM_NAME=iOS \
118 -DALSOFT_OSX_FRAMEWORK=ON \
119 -DALSOFT_REQUIRE_COREAUDIO=ON \
120 -DALSOFT_EMBED_HRTF_DATA=YES \
121 "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64" \
124 - cmake --build . --clean-first