From 30a3ff0de636db1311ce6ba35f64bbfd83a1383d Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 29 Apr 2015 11:43:53 +0300 Subject: [PATCH] fixed compile errors on OSX and other systems where ffmpeg is detected manually, not via pkg-config --- cmake/OpenCVFindLibsVideo.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake index b2d927957f..6e1029c2c4 100644 --- a/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake @@ -229,6 +229,18 @@ if(WITH_FFMPEG) find_library(FFMPEG_UTIL_LIB "avutil" HINTS "${FFMPEG_LIB_DIR}") find_library(FFMPEG_SWSCALE_LIB "swscale" HINTS "${FFMPEG_LIB_DIR}") find_library(FFMPEG_RESAMPLE_LIB "avresample" HINTS "${FFMPEG_LIB_DIR}") + if(FFMPEG_CODEC_LIB) + set(HAVE_FFMPEG_CODEC 1) + endif() + if(FFMPEG_FORMAT_LIB) + set(HAVE_FFMPEG_FORMAT 1) + endif() + if(FFMPEG_UTIL_LIB) + set(HAVE_FFMPEG_UTIL 1) + endif() + if(FFMPEG_SWSCALE_LIB) + set(HAVE_FFMPEG_SWSCALE 1) + endif() if(FFMPEG_CODEC_LIB AND FFMPEG_FORMAT_LIB AND FFMPEG_UTIL_LIB AND FFMPEG_SWSCALE_LIB) set(ALIASOF_libavcodec_VERSION "Unknown")