mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
cmake: Move ALSA detection to AudioCommon
This commit is contained in:
parent
d615c0f868
commit
2fceb016b4
@ -434,19 +434,6 @@ if (OPENGL_GL)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_ALSA)
|
||||
find_package(ALSA)
|
||||
if(ALSA_FOUND)
|
||||
add_definitions(-DHAVE_ALSA=1)
|
||||
message(STATUS "ALSA found, enabling ALSA sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_ALSA=0)
|
||||
message(STATUS "ALSA NOT found, disabling ALSA sound backend")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "ALSA explicitly disabled, disabling ALSA sound backend")
|
||||
endif()
|
||||
|
||||
if(ENABLE_AO)
|
||||
check_lib(AO ao ao QUIET)
|
||||
if(AO_FOUND)
|
||||
|
@ -15,10 +15,18 @@ if(OPENSLES_FOUND)
|
||||
target_link_libraries(audiocommon PRIVATE OpenSLES::OpenSLES)
|
||||
endif()
|
||||
|
||||
find_package(ALSA)
|
||||
if(ALSA_FOUND)
|
||||
target_sources(audiocommon PRIVATE AlsaSoundStream.cpp)
|
||||
target_link_libraries(audiocommon PRIVATE ALSA::ALSA)
|
||||
if(ENABLE_ALSA)
|
||||
find_package(ALSA)
|
||||
if(ALSA_FOUND)
|
||||
message(STATUS "ALSA found, enabling ALSA sound backend")
|
||||
target_sources(audiocommon PRIVATE AlsaSoundStream.cpp)
|
||||
target_link_libraries(audiocommon PRIVATE ALSA::ALSA)
|
||||
target_compile_definitions(audiocommon PRIVATE HAVE_ALSA=1)
|
||||
else()
|
||||
message(STATUS "ALSA NOT found, disabling ALSA sound backend")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "ALSA explicitly disabled, disabling ALSA sound backend")
|
||||
endif()
|
||||
|
||||
if(AO_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user