mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 19:59:09 +00:00
Use libopus for decoding Audio
This commit is contained in:
committed by
Florian Meißner
parent
a36d8b51e7
commit
9de5c4db54
38
cmake/FindOpus.cmake
Normal file
38
cmake/FindOpus.cmake
Normal file
@ -0,0 +1,38 @@
|
||||
if(Opus_INCLUDE_DIR AND Opus_LIBRARY)
|
||||
set(Opus_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
find_path(Opus_INCLUDE_DIR opus.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
find_library(Opus_LIBRARY NAMES opus
|
||||
PATHS /usr/local/lib /usr/lib)
|
||||
|
||||
find_library(Celt_LIBRARY NAMES celt
|
||||
PATHS /usr/local/lib /usr/lib)
|
||||
|
||||
find_library(Silk_LIBRARY NAMES silk_common
|
||||
PATHS /usr/local/lib /usr/lib)
|
||||
|
||||
set(Opus_LIBRARIES
|
||||
${Opus_LIBRARY}
|
||||
${Celt_LIBRARY}
|
||||
${Silk_LIBRARY})
|
||||
|
||||
|
||||
if(Opus_INCLUDE_DIR AND Opus_LIBRARY)
|
||||
set(Opus_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if (Opus_FOUND)
|
||||
if(NOT Opus_FIND_QUIETLY)
|
||||
message(STATUS "Found libopus: ${Opus_INCLUDE_DIR}")
|
||||
endif()
|
||||
else()
|
||||
if(Opus_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find libopus")
|
||||
endif()
|
||||
endif()
|
Reference in New Issue
Block a user