Skip to content

Commit 5bf0344

Browse files
c-ewingcbentejac
authored andcommitted
Build OpenCV with FFmpeg on Linux
Due to the non-standard install location of FFmpeg during the AliceVision build OpenCV cannot find it. This patch adds FFmpeg to the BUILD_PREFIX of OpenCV to enable the FFmpeg features.
1 parent 3eb9554 commit 5bf0344

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cmake/Dependencies.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,9 @@ if(AV_BUILD_FFMPEG)
688688
BUILD_COMMAND $(MAKE) -j${AV_BUILD_DEPENDENCIES_PARALLEL}
689689
DEPENDS ${VPX_TARGET}
690690
)
691+
692+
set(FFMPEG_CMAKE_FLAGS -DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH})
693+
691694
endif()
692695

693696
if(AV_BUILD_FLANN)
@@ -1004,7 +1007,7 @@ if(AV_BUILD_OPENCV)
10041007
${CMAKE_COMMAND}
10051008
${CMAKE_CORE_BUILD_FLAGS}
10061009
-DOPENCV_EXTRA_MODULES_PATH=${CMAKE_CURRENT_BINARY_DIR}/opencv_contrib/modules
1007-
${ZLIB_CMAKE_FLAGS} ${TBB_CMAKE_FLAGS}
1010+
${ZLIB_CMAKE_FLAGS} ${TBB_CMAKE_FLAGS} ${FFMPEG_CMAKE_FLAGS}
10081011
${TIFF_CMAKE_FLAGS} ${PNG_CMAKE_FLAGS} ${JPEG_CMAKE_FLAGS} ${LIBRAW_CMAKE_FLAGS}
10091012
-DWITH_TBB=ON
10101013
-DWITH_FFMPEG=${AV_BUILD_FFMPEG}

0 commit comments

Comments
 (0)