Skip to content

Commit

Permalink
Build OpenCV with FFmpeg on Linux
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
c-ewing authored and cbentejac committed Dec 2, 2024
1 parent 3eb9554 commit 5bf0344
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ if(AV_BUILD_FFMPEG)
BUILD_COMMAND $(MAKE) -j${AV_BUILD_DEPENDENCIES_PARALLEL}
DEPENDS ${VPX_TARGET}
)

set(FFMPEG_CMAKE_FLAGS -DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH})

endif()

if(AV_BUILD_FLANN)
Expand Down Expand Up @@ -1004,7 +1007,7 @@ if(AV_BUILD_OPENCV)
${CMAKE_COMMAND}
${CMAKE_CORE_BUILD_FLAGS}
-DOPENCV_EXTRA_MODULES_PATH=${CMAKE_CURRENT_BINARY_DIR}/opencv_contrib/modules
${ZLIB_CMAKE_FLAGS} ${TBB_CMAKE_FLAGS}
${ZLIB_CMAKE_FLAGS} ${TBB_CMAKE_FLAGS} ${FFMPEG_CMAKE_FLAGS}
${TIFF_CMAKE_FLAGS} ${PNG_CMAKE_FLAGS} ${JPEG_CMAKE_FLAGS} ${LIBRAW_CMAKE_FLAGS}
-DWITH_TBB=ON
-DWITH_FFMPEG=${AV_BUILD_FFMPEG}
Expand Down

0 comments on commit 5bf0344

Please sign in to comment.