aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-18 15:17:53 -0700
committerChris Robinson <[email protected]>2020-04-18 15:17:53 -0700
commit67e54a26697f5e898f5b0e040f18281a28c16023 (patch)
tree2209f07479fea9c4787032cd79d693dee746687c /CMakeLists.txt
parenta1e5f4eb8374e46348146ee19a031e446a65bade (diff)
Add an Oboe backend stub
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)