Skip to content

Commit 1a10932

Browse files
committed
Fix USE_SYSTEM_OPENAL to use system headers
Even when USE_SYSTEM_OPENAL was enabled, the code directly included the bundled OpenAL headers, bypassing the system headers. Since `#include <AL/al.h>` is not portable, use `#include "al.h"` instead. https://cmake.org/cmake/help/latest/module/FindOpenAL.html
1 parent 487c585 commit 1a10932

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

3rdparty/OpenAL/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ if(USE_SYSTEM_OPENAL)
66
find_package(OpenAL REQUIRED)
77
endif()
88
add_library(3rdparty_openal INTERFACE)
9+
target_include_directories(3rdparty_openal INTERFACE ${OPENAL_INCLUDE_DIR})
910
target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
1011
set_target_properties(OpenAL::OpenAL PROPERTIES IMPORTED_GLOBAL ON)
1112
else()
1213
option(ALSOFT_UTILS "Build utility programs" OFF)
1314
option(ALSOFT_EXAMPLES "Build example programs" OFF)
1415
add_subdirectory(openal-soft EXCLUDE_FROM_ALL)
1516
add_library(3rdparty_openal INTERFACE)
17+
target_include_directories(3rdparty_openal INTERFACE ${OPENAL_INCLUDE_DIR})
1618
target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
1719
endif()

rpcs3/Emu/Cell/Modules/cellMic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <cmath>
1212

1313
#ifndef WITHOUT_OPENAL
14-
#include "3rdparty/OpenAL/openal-soft/include/AL/alext.h"
14+
#include "alext.h"
1515
#endif
1616

1717
LOG_CHANNEL(cellMic);

rpcs3/Emu/Cell/Modules/cellMic.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#pragma once
22

33
#include "Utilities/Thread.h"
4-
#include "3rdparty/OpenAL/openal-soft/include/AL/alc.h"
54
#include "Utilities/mutex.h"
65

6+
#include "alc.h"
7+
78
// Error Codes
89
enum CellMicInError : u32
910
{

rpcs3/rpcs3qt/microphone_creator.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#include "Utilities/StrUtil.h"
55

6-
#include "3rdparty/OpenAL/openal-soft/include/AL/al.h"
7-
#include "3rdparty/OpenAL/openal-soft/include/AL/alc.h"
6+
#include "al.h"
7+
#include "alc.h"
88

99
LOG_CHANNEL(cfg_log, "CFG");
1010

0 commit comments

Comments
 (0)