Files
Cubed/cmake/modules/FindOpus.cmake
zhenyan121 bf6edeb812 feat(audio): implement voice chat using Opus codec
Add voice chat support with Opus encoding/decoding, push-to-talk (V key), and new audio recording infrastructure.
2026-07-20 15:14:01 +08:00

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()