OpenAL fallback for Unix;

This commit is contained in:
bjorn 2017-09-05 22:13:01 -07:00
parent 1d1277ba76
commit 8e5e8e81ca
1 changed files with 7 additions and 1 deletions

View File

@ -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}")