mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
Add voice chat support with Opus encoding/decoding, push-to-talk (V key), and new audio recording infrastructure.
25 lines
480 B
CMake
25 lines
480 B
CMake
include(FindPackageHandleStandardArgs)
|
|
|
|
find_path(OPUS_INCLUDE_DIR
|
|
NAMES opus/opus.h opus.h
|
|
)
|
|
|
|
find_library(OPUS_LIBRARY
|
|
NAMES opus
|
|
)
|
|
|
|
find_package_handle_standard_args(
|
|
Opus
|
|
REQUIRED_VARS
|
|
OPUS_INCLUDE_DIR
|
|
OPUS_LIBRARY
|
|
)
|
|
|
|
if(Opus_FOUND)
|
|
add_library(Opus::Opus UNKNOWN IMPORTED)
|
|
|
|
set_target_properties(Opus::Opus PROPERTIES
|
|
IMPORTED_LOCATION "${OPUS_LIBRARY}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${OPUS_INCLUDE_DIR}"
|
|
)
|
|
endif() |