aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1745704a..782ac46d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -988,6 +988,35 @@ IF(ALSOFT_REQUIRE_OPENSL AND NOT HAVE_OPENSL)
MESSAGE(FATAL_ERROR "Failed to enabled required OpenSL backend")
ENDIF()
+# Check for Oboe (Android) backend
+set(OBOE_TARGET )
+if(ANDROID)
+ set(OBOE_SOURCE "" CACHE STRING "Source directory for Oboe.")
+ if(OBOE_SOURCE)
+ add_subdirectory(${OBOE_SOURCE} ./oboe)
+ set(OBOE_TARGET oboe)
+ else()
+ find_package(Oboe)
+ if(OBOE_FOUND)
+ set(OBOE_TARGET "oboe::oboe")
+ endif()
+ endif()
+endif()
+
+option(ALSOFT_REQUIRE_OBOE "Require Oboe backend" OFF)
+if(OBOE_TARGET)
+ option(ALSOFT_BACKEND_OBOE "Enable Oboe backend" ON)
+ if(ALSOFT_BACKEND_OBOE)
+ set(HAVE_OBOE 1)
+ set(ALC_OBJS ${ALC_OBJS} alc/backends/oboe.cpp alc/backends/oboe.h)
+ set(BACKENDS "${BACKENDS} Oboe,")
+ set(EXTRA_LIBS ${OBOE_TARGET} ${EXTRA_LIBS})
+ endif()
+endif()
+if(ALSOFT_REQUIRE_OBOE AND NOT HAVE_OBOE)
+ message(FATAL_ERROR "Failed to enabled required Oboe backend")
+endif()
+
# Check for SDL2 backend
OPTION(ALSOFT_REQUIRE_SDL2 "Require SDL2 backend" OFF)
FIND_PACKAGE(SDL2)