mirror of https://github.com/FreeRDP/FreeRDP
[libfreerdp] prefer opus CMake file over pkg-config
This commit is contained in:
parent
e355b64059
commit
9b7fa92521
|
@ -69,17 +69,17 @@ macro (freerdp_include_directory_add)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro (freerdp_library_add_public)
|
macro (freerdp_library_add_public)
|
||||||
foreach (_lib ${ARGN})
|
foreach (_lib ${ARGN})
|
||||||
list (APPEND LIBFREERDP_PUB_LIBS "${_lib}")
|
list (APPEND LIBFREERDP_PUB_LIBS "${_lib}")
|
||||||
endforeach()
|
endforeach()
|
||||||
set (LIBFREERDP_PUB_LIBS ${LIBFREERDP_PUB_LIBS} PARENT_SCOPE)
|
set (LIBFREERDP_PUB_LIBS ${LIBFREERDP_PUB_LIBS} PARENT_SCOPE)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro (freerdp_library_add)
|
macro (freerdp_library_add)
|
||||||
foreach (_lib ${ARGN})
|
foreach (_lib ${ARGN})
|
||||||
list (APPEND LIBFREERDP_LIBS "${_lib}")
|
list (APPEND LIBFREERDP_LIBS "${_lib}")
|
||||||
endforeach()
|
endforeach()
|
||||||
set (LIBFREERDP_LIBS ${LIBFREERDP_LIBS} PARENT_SCOPE)
|
set (LIBFREERDP_LIBS ${LIBFREERDP_LIBS} PARENT_SCOPE)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro (freerdp_definition_add)
|
macro (freerdp_definition_add)
|
||||||
|
@ -132,8 +132,8 @@ endif ()
|
||||||
|
|
||||||
# codec
|
# codec
|
||||||
set(CODEC_SRCS
|
set(CODEC_SRCS
|
||||||
codec/bulk.c
|
codec/bulk.c
|
||||||
codec/bulk.h
|
codec/bulk.h
|
||||||
codec/dsp.c
|
codec/dsp.c
|
||||||
codec/color.c
|
codec/color.c
|
||||||
codec/audio.c
|
codec/audio.c
|
||||||
|
@ -197,8 +197,8 @@ if (WITH_DSP_FFMPEG)
|
||||||
${CODEC_SRCS}
|
${CODEC_SRCS}
|
||||||
codec/dsp_ffmpeg.c
|
codec/dsp_ffmpeg.c
|
||||||
codec/dsp_ffmpeg.h)
|
codec/dsp_ffmpeg.h)
|
||||||
freerdp_include_directory_add(${FFMPEG_INCLUDE_DIRS})
|
freerdp_include_directory_add(${FFMPEG_INCLUDE_DIRS})
|
||||||
freerdp_library_add(${FFMPEG_LIBRARIES})
|
freerdp_library_add(${FFMPEG_LIBRARIES})
|
||||||
endif (WITH_DSP_FFMPEG)
|
endif (WITH_DSP_FFMPEG)
|
||||||
|
|
||||||
if (WITH_SOXR)
|
if (WITH_SOXR)
|
||||||
|
@ -218,20 +218,31 @@ endif()
|
||||||
|
|
||||||
set(OPUS_DEFAULT OFF)
|
set(OPUS_DEFAULT OFF)
|
||||||
if (NOT WITH_DSP_FFMPEG)
|
if (NOT WITH_DSP_FFMPEG)
|
||||||
find_package(PkgConfig)
|
find_package(Opus)
|
||||||
if (PkgConfig_FOUND)
|
if (Opus_FOUND)
|
||||||
pkg_check_modules(OPUS opus)
|
set(OPUS_DEFAULT ${OPUS_FOUND})
|
||||||
set(OPUS_DEFAULT ${OPUS_FOUND})
|
else()
|
||||||
endif()
|
find_package(PkgConfig)
|
||||||
|
if (PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(OPUS opus)
|
||||||
|
set(OPUS_DEFAULT ${OPUS_FOUND})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(WITH_OPUS "compile with opus codec support" ${OPUS_DEFAULT})
|
option(WITH_OPUS "compile with opus codec support" ${OPUS_DEFAULT})
|
||||||
if (WITH_OPUS)
|
if (WITH_OPUS)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(Opus)
|
||||||
pkg_check_modules(OPUS REQUIRED opus)
|
if (Opus_FOUND)
|
||||||
if(OPUS_FOUND)
|
freerdp_library_add(Opus::opus)
|
||||||
freerdp_library_add(${OPUS_LIBRARIES})
|
else()
|
||||||
include_directories(${OPUS_INCLUDE_DIRS})
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(OPUS REQUIRED opus)
|
||||||
|
if(OPUS_FOUND)
|
||||||
|
freerdp_library_add(${OPUS_LIBRARIES})
|
||||||
|
include_directories(${OPUS_INCLUDE_DIRS})
|
||||||
|
link_directories(${OPUS_LIBRARY_DIRS})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -246,13 +257,13 @@ if(FAAC_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WITH_AAD)
|
if (WITH_AAD)
|
||||||
if (NOT cJSON_FOUND)
|
if (NOT cJSON_FOUND)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(CJSON REQUIRED libcjson)
|
pkg_check_modules(CJSON REQUIRED libcjson)
|
||||||
endif()
|
endif()
|
||||||
include_directories(${CJSON_INCLUDE_DIRS})
|
include_directories(${CJSON_INCLUDE_DIRS})
|
||||||
|
|
||||||
freerdp_library_add(${CJSON_LIBRARIES})
|
freerdp_library_add(${CJSON_LIBRARIES})
|
||||||
include_directories(${CJSON_INCLUDE_DIRS})
|
include_directories(${CJSON_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -293,8 +304,8 @@ endif()
|
||||||
if(ANDROID AND WITH_MEDIACODEC)
|
if(ANDROID AND WITH_MEDIACODEC)
|
||||||
list(APPEND CODEC_SRCS codec/h264_mediacodec.c)
|
list(APPEND CODEC_SRCS codec/h264_mediacodec.c)
|
||||||
|
|
||||||
find_library(MEDIACODEC mediandk REQUIRED)
|
find_library(MEDIACODEC mediandk REQUIRED)
|
||||||
freerdp_library_add(${MEDIACODEC})
|
freerdp_library_add(${MEDIACODEC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
freerdp_module_add(${CODEC_SRCS})
|
freerdp_module_add(${CODEC_SRCS})
|
||||||
|
|
Loading…
Reference in New Issue