OpenAL fallback for Unix;
@@ -149,7 +149,13 @@ if (WIN32)
include_directories(deps/openal-soft/include)
set(LOVR_OPENAL OpenAL32)
elseif(NOT EMSCRIPTEN)
- pkg_search_module(OPENAL REQUIRED openal)
+ pkg_search_module(OPENAL openal-soft)
+ if (NOT OPENAL_FOUND)
+ pkg_search_module(OPENAL openal)
+ if (NOT OPENAL_FOUND)
+ message(FATAL_ERROR "OpenAL not found.")
+ endif()
+ endif()
include_directories(${OPENAL_INCLUDE_DIRS})
string(REPLACE ";" " " OPENAL_LDFLAGS_STR "${OPENAL_LDFLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENAL_LDFLAGS_STR}")
