[codec,dsp] fix opus related code

* proper library detection
* default to NOT WITH_DSP_FFMPEG
* disable if WITH_DSP_FFMPEG
This commit is contained in:
akallabeth
2023-11-20 09:20:41 +01:00
committed by akallabeth
parent 330f7ae0a2
commit a232cec690
2 changed files with 29 additions and 16 deletions

View File

@@ -216,9 +216,21 @@ if(LAME_FOUND)
include_directories(${LAME_INCLUDE_DIRS})
endif()
if(OPUS_FOUND)
freerdp_library_add(${OPUS_LIBRARIES})
include_directories(${OPUS_INCLUDE_DIRS})
set(OPUS_DEFAULT OFF)
if (NOT WITH_DSP_FFMPEG)
find_package(PkgConfig REQUIRED)
pkg_check_modules(OPUS REQUIRED opus)
set(OPUS_DEFAULT ${OPUS_FOUND})
endif()
option(WITH_OPUS "compile with opus codec support" ${OPUS_DEFAULT})
if (WITH_OPUS)
find_package(PkgConfig REQUIRED)
pkg_check_modules(OPUS REQUIRED opus)
if(OPUS_FOUND)
freerdp_library_add(${OPUS_LIBRARIES})
include_directories(${OPUS_INCLUDE_DIRS})
endif()
endif()
if(FAAD2_FOUND)