mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Only build OpenAL on Windows
This commit is contained in:
@ -32,23 +32,6 @@ else()
|
||||
message(STATUS "ALSA explicitly disabled, disabling ALSA sound backend")
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPENAL)
|
||||
if(WIN32)
|
||||
set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/Externals/OpenAL)
|
||||
endif()
|
||||
find_package(OpenAL)
|
||||
if(OPENAL_FOUND)
|
||||
message(STATUS "OpenAL found, enabling OpenAL sound backend")
|
||||
target_sources(audiocommon PRIVATE OpenALStream.cpp)
|
||||
target_link_libraries(audiocommon PRIVATE OpenAL::OpenAL)
|
||||
target_compile_definitions(audiocommon PRIVATE HAVE_OPENAL=1)
|
||||
else()
|
||||
message(STATUS "OpenAL NOT found, disabling OpenAL sound backend")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "OpenAL explicitly disabled, disabling OpenAL sound backend")
|
||||
endif()
|
||||
|
||||
if(ENABLE_PULSEAUDIO)
|
||||
# PulseAudio ships with a PulseAudioConfig.cmake with no imported target
|
||||
# So we use our own FindPulseAudio instead with "MODULE"
|
||||
@ -75,6 +58,16 @@ if(WIN32)
|
||||
)
|
||||
target_link_libraries(audiocommon PRIVATE audiocommon_xaudio27)
|
||||
|
||||
set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/Externals/OpenAL)
|
||||
find_package(OpenAL)
|
||||
if(OPENAL_FOUND)
|
||||
message(STATUS "OpenAL found, enabling OpenAL sound backend")
|
||||
target_sources(audiocommon PRIVATE OpenALStream.cpp)
|
||||
target_link_libraries(audiocommon PRIVATE OpenAL::OpenAL)
|
||||
else()
|
||||
message(FATAL_ERROR "OpenAL NOT found in Externals")
|
||||
endif()
|
||||
|
||||
elseif(APPLE)
|
||||
target_sources(audiocommon PRIVATE CoreAudioSoundStream.cpp)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user