diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:16:29 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:16:29 -0500 |
| commit | 399ecdd511fe8499d2feb3681e82efda37ced17d (patch) | |
| tree | c6194830ee1d33870b9867329676c57366aff581 /runtime/cmake/opus_decoder.cmake | |
| parent | f5f67b4a9daae13d5a8a68358c1167e6866ec293 (diff) | |
| parent | 4cfbdfc0b2e39e9137b7f40c48863f1e0e444adc (diff) | |
Merge #2044 from BubsMcgee: decode Opus packets through a Rust sidecar (RT-XAPU-OPUS-DECODE), with #1144 from nicoco23: xapu.dll as a command queue (RT-XAPU-CONNECT-LAYOUTS)
Head 4cfbdfc0b, which contains #1144's head 6ee7ef89b.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/cmake/opus_decoder.cmake')
| -rw-r--r-- | runtime/cmake/opus_decoder.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/runtime/cmake/opus_decoder.cmake b/runtime/cmake/opus_decoder.cmake new file mode 100644 index 000000000..1286b15fa --- /dev/null +++ b/runtime/cmake/opus_decoder.cmake | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # Resolves -DLEONIDA_OPUS_DECODER_LIB=<path> for runtime/CMakeLists.txt. | ||
| 2 | # | ||
| 3 | # When LEONIDA_OPUS_DECODER_LIB is set, the runtime links that prebuilt static library directly and | ||
| 4 | # skips running cargo at configure time. A value that does not name an existing file is a configure | ||
| 5 | # error rather than a silent fallback to silent XAPU output. | ||
| 6 | function(leonida_resolve_prebuilt_opus_decoder lib_input base_dir out_var) | ||
| 7 | if(NOT lib_input) | ||
| 8 | set(${out_var} "" PARENT_SCOPE) | ||
| 9 | return() | ||
| 10 | endif() | ||
| 11 | if(IS_ABSOLUTE "${lib_input}") | ||
| 12 | set(_resolved "${lib_input}") | ||
| 13 | else() | ||
| 14 | cmake_path(ABSOLUTE_PATH lib_input BASE_DIRECTORY "${base_dir}" NORMALIZE OUTPUT_VARIABLE _resolved) | ||
| 15 | endif() | ||
| 16 | if(EXISTS "${_resolved}" AND NOT IS_DIRECTORY "${_resolved}") | ||
| 17 | set(${out_var} "${_resolved}" PARENT_SCOPE) | ||
| 18 | else() | ||
| 19 | message(FATAL_ERROR | ||
| 20 | "LEONIDA_OPUS_DECODER_LIB does not point to an existing file: ${_resolved} " | ||
| 21 | "(pass the path to leonida_opus_decoder.lib or leave it empty to build with cargo)") | ||
| 22 | endif() | ||
| 23 | endfunction() | ||