summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorMichael Maltese <michaeljosephmaltese@gmail.com>2017-05-26 00:45:37 -0700
committerMichael Maltese <michaeljosephmaltese@gmail.com>2017-05-26 00:53:58 -0700
commit9dfd8bbf385fbe8063896a6a5d526f4223fe129f (patch)
tree3fe401f73d272fafa3eb28518602e485afe95769 /CMake
parentd951d2e4c4540012fe43d637368e4c545a06c636 (diff)
CMake: fix FindFFmpeg when ffmpeg isn't found
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindFFmpeg.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMake/FindFFmpeg.cmake b/CMake/FindFFmpeg.cmake
index a8c482dc21..af7711f6f3 100644
--- a/CMake/FindFFmpeg.cmake
+++ b/CMake/FindFFmpeg.cmake
@@ -95,7 +95,7 @@ function(find_ffmpeg LIBNAME)
if(NOT FFMPEG_DIR AND (NOT FFmpeg_LIBRARY_${LIBNAME} OR NOT FFmpeg_INCLUDE_${LIBNAME}))
# Didn't find it in the usual paths, try pkg-config
find_package(PkgConfig QUIET)
- pkg_check_modules(FFmpeg_PKGCONFIG_${LIBNAME} REQUIRED QUIET lib${LIBNAME})
+ pkg_check_modules(FFmpeg_PKGCONFIG_${LIBNAME} QUIET lib${LIBNAME})
find_path(FFmpeg_INCLUDE_${LIBNAME} lib${LIBNAME}/${LIBNAME}.h
${FFmpeg_PKGCONFIG_${LIBNAME}_INCLUDE_DIRS}
@@ -144,7 +144,9 @@ foreach(c ${_FFmpeg_ALL_COMPONENTS})
endif()
endforeach()
-list(REMOVE_DUPLICATES FFmpeg_INCLUDES)
+if(FFmpeg_INCLUDES)
+ list(REMOVE_DUPLICATES FFmpeg_INCLUDES)
+endif()
foreach(c ${FFmpeg_FIND_COMPONENTS})
list(APPEND _FFmpeg_REQUIRED_VARS FFmpeg_INCLUDE_${c} FFmpeg_LIBRARY_${c})