Skip to content

Commit bda335a

Browse files
marcin-serwinMegamouse
authored andcommitted
cmake: add option to use system cubeb
Signed-off-by: Marcin Serwin <[email protected]>
1 parent 38289f3 commit bda335a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

3rdparty/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@ add_subdirectory(stblib)
131131
add_subdirectory(discord-rpc)
132132

133133
# Cubeb
134-
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
134+
if(USE_SYSTEM_CUBEB)
135+
find_package(cubeb REQUIRED GLOBAL)
136+
message(STATUS "Using system cubeb version '${cubeb_VERSION}'")
137+
add_library(3rdparty::cubeb ALIAS cubeb::cubeb)
138+
else()
139+
message(STATUS "Using static cubeb from 3rdparty")
140+
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
141+
endif()
135142

136143
# SoundTouch
137144
add_subdirectory(SoundTouch EXCLUDE_FROM_ALL)

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ option(USE_SYSTEM_FFMPEG "Prefer system ffmpeg instead of the prebuild one" OFF)
3131
option(USE_SYSTEM_OPENAL "Prefer system OpenAL instead of the prebuild one" ON)
3232
option(USE_SYSTEM_CURL "Prefer system Curl instead of the prebuild one" ON)
3333
option(USE_SYSTEM_OPENCV "Prefer system OpenCV instead of the builtin one" ON)
34+
option(USE_SYSTEM_CUBEB "Prefer system cubeb instead of the builtin one" OFF)
3435
option(HAS_MEMORY_BREAKPOINTS "Add support for memory breakpoints to the interpreter" OFF)
3536
option(USE_LTO "Use LTO for building" ON)
3637
option(BUILD_RPCS3_TESTS "Build RPCS3 unit tests." OFF)

0 commit comments

Comments
 (0)