[cmake] unify ffmpeg and swscale detection
This commit is contained in:
parent
0bbf0b6e80
commit
52ee2e4668
@ -496,10 +496,6 @@ set(PCSC_FEATURE_TYPE "RECOMMENDED")
|
||||
set(PCSC_FEATURE_PURPOSE "smart card")
|
||||
set(PCSC_FEATURE_DESCRIPTION "smart card device redirection")
|
||||
|
||||
set(FFMPEG_FEATURE_TYPE "RECOMMENDED")
|
||||
set(FFMPEG_FEATURE_PURPOSE "multimedia")
|
||||
set(FFMPEG_FEATURE_DESCRIPTION "multimedia redirection, audio and video playback")
|
||||
|
||||
set(OPENH264_FEATURE_TYPE "OPTIONAL")
|
||||
set(OPENH264_FEATURE_PURPOSE "codec")
|
||||
set(OPENH264_FEATURE_DESCRIPTION "use OpenH264 library")
|
||||
@ -531,11 +527,9 @@ set(SOXR_FEATURE_DESCRIPTION "SOX audio resample library")
|
||||
if(WIN32)
|
||||
set(WAYLAND_FEATURE_TYPE "DISABLED")
|
||||
set(PCSC_FEATURE_TYPE "DISABLED")
|
||||
set(FFMPEG_FEATURE_TYPE "OPTIONAL")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(FFMPEG_FEATURE_TYPE "OPTIONAL")
|
||||
set(WAYLAND_FEATURE_TYPE "DISABLED")
|
||||
if(IOS)
|
||||
set(PCSC_FEATURE_TYPE "DISABLED")
|
||||
@ -568,11 +562,9 @@ endif()
|
||||
find_feature(PCSC ${PCSC_FEATURE_TYPE} ${PCSC_FEATURE_PURPOSE} ${PCSC_FEATURE_DESCRIPTION})
|
||||
|
||||
if (WITH_DSP_FFMPEG OR WITH_VIDEO_FFMPEG OR WITH_FFMPEG)
|
||||
set(FFMPEG_FEATURE_TYPE "REQUIRED" )
|
||||
find_package(FFmpeg REQUIRED COMPONENTS AVUTIL AVCODEC)
|
||||
endif()
|
||||
|
||||
find_feature(FFmpeg ${FFMPEG_FEATURE_TYPE} ${FFMPEG_FEATURE_PURPOSE} ${FFMPEG_FEATURE_DESCRIPTION})
|
||||
|
||||
find_feature(OpenH264 ${OPENH264_FEATURE_TYPE} ${OPENH264_FEATURE_PURPOSE} ${OPENH264_FEATURE_DESCRIPTION})
|
||||
find_feature(OpenCL ${OPENCL_FEATURE_TYPE} ${OPENCL_FEATURE_PURPOSE} ${OPENCL_FEATURE_DESCRIPTION})
|
||||
find_feature(GSM ${GSM_FEATURE_TYPE} ${GSM_FEATURE_PURPOSE} ${GSM_FEATURE_DESCRIPTION})
|
||||
|
@ -22,7 +22,7 @@ if(NOT WITH_SWSCALE OR NOT WITH_FFMPEG)
|
||||
endif()
|
||||
|
||||
# currently camera redirect client supported for platforms with Video4Linux only
|
||||
find_package(SWScale REQUIRED)
|
||||
find_package(FFmpeg REQUIRED COMPONENTS SWSCALE)
|
||||
find_package(V4L)
|
||||
if(V4L_FOUND)
|
||||
set(WITH_V4L ON)
|
||||
@ -31,7 +31,7 @@ else()
|
||||
message(FATAL_ERROR "libv4l-dev required for CHANNEL_RDPECAM_CLIENT")
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM ${SWScale_INCLUDE_DIR})
|
||||
include_directories(SYSTEM ${SWSCALE_INCLUDE_DIRS})
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
camera_device_enum_main.c
|
||||
@ -42,7 +42,7 @@ set(${MODULE_PREFIX}_SRCS
|
||||
set(${MODULE_PREFIX}_LIBS
|
||||
freerdp
|
||||
winpr
|
||||
${SWScale_LIBRARY}
|
||||
${SWSCALE_LIBRARY}
|
||||
${FFMPEG_LIBRARIES}
|
||||
)
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SWScale libswscale)
|
||||
endif()
|
||||
|
||||
find_path(SWScale_INCLUDE_DIR libswscale/swscale.h PATHS ${SWScale_INCLUDE_DIRS})
|
||||
find_library(SWScale_LIBRARY swscale PATHS ${SWScale_LIBRARY_DIRS})
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWScale DEFAULT_MSG SWScale_INCLUDE_DIR SWScale_LIBRARY)
|
||||
|
||||
mark_as_advanced(SWScale_INCLUDE_DIR SWScale_LIBRARY)
|
||||
|
@ -139,7 +139,7 @@ if (WITH_OPUS)
|
||||
endif()
|
||||
|
||||
if (WITH_SWSCALE)
|
||||
find_package(SWScale REQUIRED)
|
||||
find_package(FFmpeg REQUIRED COMPONENTS SWSCALE)
|
||||
endif(WITH_SWSCALE)
|
||||
if (WITH_CAIRO)
|
||||
find_package(Cairo REQUIRED)
|
||||
@ -147,8 +147,8 @@ endif(WITH_CAIRO)
|
||||
|
||||
# Prefer SWScale over Cairo, both at the same time are not possible.
|
||||
if (WITH_SWSCALE)
|
||||
include_directories(SYSTEM ${SWScale_INCLUDE_DIR})
|
||||
freerdp_library_add(${SWScale_LIBRARY})
|
||||
include_directories(SYSTEM ${SWSCALE_INCLUDE_DIRS})
|
||||
freerdp_library_add(${SWSCALE_LIBRARY})
|
||||
endif()
|
||||
if (WITH_CAIRO)
|
||||
include_directories(SYSTEM ${CAIRO_INCLUDE_DIR})
|
||||
|
Loading…
Reference in New Issue
Block a user