diff --git a/cmake/Modules/FindFFmpeg.cmake b/cmake/Modules/FindFFmpeg.cmake index b2409e05..b6da9244 100644 --- a/cmake/Modules/FindFFmpeg.cmake +++ b/cmake/Modules/FindFFmpeg.cmake @@ -180,9 +180,16 @@ foreach (_component ${FFmpeg_FIND_COMPONENTS}) endif () endforeach () -# Build the include path with duplicates removed. +# Build the result lists with duplicates removed, in case of repeated +# invocations. if (FFmpeg_INCLUDE_DIRS) list(REMOVE_DUPLICATES FFmpeg_INCLUDE_DIRS) +endif() +if (FFmpeg_LIBRARIES) + list(REMOVE_DUPLICATES FFmpeg_LIBRARIES) +endif() +if(FFmpeg_DEFINITIONS) + list(REMOVE_DUPLICATES FFmpeg_DEFINITIONS) endif () # cache the vars.