Skip to content

Commit 68ac05f

Browse files
committed
Set USE_SYSTEM_OPENAL default to OFF on macOS and Windows
On Linux, using system libraries is generally preferred, but this is less relevant on macOS and Windows. In particular, macOS does not provide "alext.h" in its OpenAL framework, which causes the build to fail.
1 parent 3290ecc commit 68ac05f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
1515
endif()
1616
endif()
1717

18+
if(APPLE OR WIN32)
19+
set(USE_SYSTEM_OPENAL_DEFAULT OFF)
20+
else()
21+
set(USE_SYSTEM_OPENAL_DEFAULT ON)
22+
endif()
23+
1824
option(USE_NATIVE_INSTRUCTIONS "USE_NATIVE_INSTRUCTIONS makes rpcs3 compile with -march=native, which is useful for local builds, but not good for packages." ON)
1925
option(WITH_LLVM "Enable usage of LLVM library" ON)
2026
option(BUILD_LLVM "Build LLVM from git submodule" OFF)
@@ -28,7 +34,7 @@ option(USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)
2834
option(USE_SDL "Enables SDL input handler" OFF)
2935
option(USE_SYSTEM_SDL "Prefer system SDL instead of the builtin one" ON)
3036
option(USE_SYSTEM_FFMPEG "Prefer system ffmpeg instead of the prebuild one" OFF)
31-
option(USE_SYSTEM_OPENAL "Prefer system OpenAL instead of the prebuild one" ON)
37+
option(USE_SYSTEM_OPENAL "Prefer system OpenAL instead of the prebuild one" ${USE_SYSTEM_OPENAL_DEFAULT})
3238
option(USE_SYSTEM_CURL "Prefer system Curl instead of the prebuild one" ON)
3339
option(USE_SYSTEM_OPENCV "Prefer system OpenCV instead of the builtin one" ON)
3440
option(HAS_MEMORY_BREAKPOINTS "Add support for memory breakpoints to the interpreter" OFF)

0 commit comments

Comments
 (0)