mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
cmake: Move detection of OpenAL to AudioCommon
This commit is contained in:
parent
662a6e836d
commit
d1eaa59a8e
@ -447,23 +447,6 @@ else()
|
|||||||
message(STATUS "PulseAudio explicitly disabled, disabling PulseAudio sound backend")
|
message(STATUS "PulseAudio explicitly disabled, disabling PulseAudio sound backend")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_OPENAL)
|
|
||||||
if(WIN32)
|
|
||||||
set(ENV{OPENALDIR} ${CMAKE_CURRENT_LIST_DIR}/Externals/OpenAL)
|
|
||||||
endif()
|
|
||||||
find_package(OpenAL)
|
|
||||||
if(OPENAL_FOUND)
|
|
||||||
add_definitions(-DHAVE_OPENAL=1)
|
|
||||||
include_directories(${OPENAL_INCLUDE_DIR})
|
|
||||||
message(STATUS "OpenAL found, enabling OpenAL sound backend")
|
|
||||||
else()
|
|
||||||
add_definitions(-DHAVE_OPENAL=0)
|
|
||||||
message(STATUS "OpenAL NOT found, disabling OpenAL sound backend")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(STATUS "OpenAL explicitly disabled, disabling OpenAL sound backend")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ENABLE_LLVM)
|
if(ENABLE_LLVM)
|
||||||
find_package(LLVM)
|
find_package(LLVM)
|
||||||
if (LLVM_FOUND)
|
if (LLVM_FOUND)
|
||||||
@ -678,6 +661,7 @@ else()
|
|||||||
set(PNG png)
|
set(PNG png)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(OpenAL)
|
||||||
if(OPENAL_FOUND)
|
if(OPENAL_FOUND)
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
check_lib(SOUNDTOUCH soundtouch SoundTouch soundtouch/SoundTouch.h QUIET)
|
check_lib(SOUNDTOUCH soundtouch SoundTouch soundtouch/SoundTouch.h QUIET)
|
||||||
|
@ -43,9 +43,21 @@ else()
|
|||||||
message(STATUS "ao explicitly disabled, disabling ao sound backend")
|
message(STATUS "ao explicitly disabled, disabling ao sound backend")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(OPENAL_FOUND)
|
if(ENABLE_OPENAL)
|
||||||
target_sources(audiocommon PRIVATE OpenALStream.cpp aldlist.cpp)
|
if(WIN32)
|
||||||
target_link_libraries(audiocommon PRIVATE ${OPENAL_LIBRARY} SoundTouch)
|
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 aldlist.cpp)
|
||||||
|
target_link_libraries(audiocommon PRIVATE OpenAL::OpenAL SoundTouch)
|
||||||
|
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()
|
endif()
|
||||||
|
|
||||||
if(PULSEAUDIO_FOUND)
|
if(PULSEAUDIO_FOUND)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user