externals: allow user to use system cubeb (#7107)
This commit is contained in:
parent
4284893044
commit
89d5d4a2b6
2 changed files with 16 additions and 4 deletions
17
externals/CMakeLists.txt
vendored
17
externals/CMakeLists.txt
vendored
|
@ -245,10 +245,19 @@ endif()
|
||||||
|
|
||||||
# Cubeb
|
# Cubeb
|
||||||
if (ENABLE_CUBEB)
|
if (ENABLE_CUBEB)
|
||||||
set(BUILD_TESTS OFF CACHE BOOL "")
|
if(USE_SYSTEM_CUBEB)
|
||||||
set(BUILD_TOOLS OFF CACHE BOOL "")
|
find_package(cubeb REQUIRED)
|
||||||
set(BUNDLE_SPEEX ON CACHE BOOL "")
|
add_library(cubeb INTERFACE)
|
||||||
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
|
target_link_libraries(cubeb INTERFACE cubeb::cubeb)
|
||||||
|
if(TARGET cubeb::cubeb)
|
||||||
|
message(STATUS "Found system cubeb")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(BUILD_TESTS OFF CACHE BOOL "")
|
||||||
|
set(BUILD_TOOLS OFF CACHE BOOL "")
|
||||||
|
set(BUNDLE_SPEEX ON CACHE BOOL "")
|
||||||
|
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# DiscordRPC
|
# DiscordRPC
|
||||||
|
|
|
@ -21,6 +21,7 @@ option(USE_SYSTEM_GLSLANG "Use the system glslang and SPIR-V libraries (instead
|
||||||
option(USE_SYSTEM_ZSTD "Use the system Zstandard library (instead of the bundled one)" OFF)
|
option(USE_SYSTEM_ZSTD "Use the system Zstandard library (instead of the bundled one)" OFF)
|
||||||
option(USE_SYSTEM_ENET "Use the system libenet (instead of the bundled one)" OFF)
|
option(USE_SYSTEM_ENET "Use the system libenet (instead of the bundled one)" OFF)
|
||||||
option(USE_SYSTEM_CRYPTOPP "Use the system cryptopp (instead of the bundled one)" OFF)
|
option(USE_SYSTEM_CRYPTOPP "Use the system cryptopp (instead of the bundled one)" OFF)
|
||||||
|
option(USE_SYSTEM_CUBEB "Use the system cubeb (instead of the bundled one)" OFF)
|
||||||
|
|
||||||
# Qt and MoltenVK are handled separately
|
# Qt and MoltenVK are handled separately
|
||||||
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_SDL2 "Disable system SDL2" OFF "USE_SYSTEM_LIBS" OFF)
|
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_SDL2 "Disable system SDL2" OFF "USE_SYSTEM_LIBS" OFF)
|
||||||
|
@ -41,6 +42,7 @@ CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_GLSLANG "Disable system glslang" OFF "USE_
|
||||||
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_ZSTD "Disable system Zstandard" OFF "USE_SYSTEM_LIBS" OFF)
|
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_ZSTD "Disable system Zstandard" OFF "USE_SYSTEM_LIBS" OFF)
|
||||||
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_ENET "Disable system libenet" OFF "USE_SYSTEM_LIBS" OFF)
|
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_ENET "Disable system libenet" OFF "USE_SYSTEM_LIBS" OFF)
|
||||||
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_CRYPTOPP "Disable system cryptopp" OFF "USE_SYSTEM_LIBS" OFF)
|
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_CRYPTOPP "Disable system cryptopp" OFF "USE_SYSTEM_LIBS" OFF)
|
||||||
|
CMAKE_DEPENDENT_OPTION(DISABLE_SYSTEM_CUBEB "Disable system cubeb" OFF "USE_SYSTEM_LIBS" OFF)
|
||||||
|
|
||||||
set(LIB_VAR_LIST
|
set(LIB_VAR_LIST
|
||||||
SDL2
|
SDL2
|
||||||
|
@ -61,6 +63,7 @@ set(LIB_VAR_LIST
|
||||||
ZSTD
|
ZSTD
|
||||||
ENET
|
ENET
|
||||||
CRYPTOPP
|
CRYPTOPP
|
||||||
|
CUBEB
|
||||||
)
|
)
|
||||||
|
|
||||||
# First, check that USE_SYSTEM_XXX is not used with USE_SYSTEM_LIBS
|
# First, check that USE_SYSTEM_XXX is not used with USE_SYSTEM_LIBS
|
||||||
|
|
Loading…
Reference in a new issue