FindFFmpeg¶
Try to find FFmpeg components.
The following components are available:
AVCODEC AVFILTER AVDEVICE AVFORMAT
AVUTIL SWRESAMPLE SWSCALE POSTPROCESS
If no components are specified in the find_module call, the following ones will be choosen as default:
AVFORMAT AVUTIL AVCODEC
Imported Targets¶
This module provides the following imported targets, if found:
FFmpeg::FFmpegFor all the required FFmpeg components
FFmpeg::<component>For each <component> that was found
Result Variables¶
This will define the following variables:
FFMPEG_FOUNDSystem has the all required components.
FFMPEG_INCLUDE_DIRSInclude directory necessary for using the required components headers.
FFMPEG_LIBRARIESLink these to use the required FFmpeg components.
FFMPEG_DEFINITIONSCompiler switches required for using the required FFmpeg components.
Additionally for each of the components, the following variables will be defined:
<component>_FOUNDTrue if (the requestion version of) <component> is available
<component>_INCLUDE_DIRSInclude directory necessary for using the <component> headers
<component>_LIBRARIESLink these to use <component>
<component>_DEFINITIONSCompiler switches required for using <component>
<component>_VERSIONThe components version (NOTE: always empty on Windows)
As the versions of the various FFmpeg components differ for a given release, and CMake supports only one common version for all components, use the following to specify required versions for multiple components:
find_package(FFmpeg 57.48 COMPONENTS AVCODEC)
find_package(FFmpeg 57.40 COMPONENTS AVFORMAT)
find_package(FFmpeg 55.27 COMPONENTS AVUTIL)
NOTE: version checking is skipped on Windows
Since 6.20.0.