Ask Your Question
0

CMake static link ffmpeg for build shared libraries

asked 2020-04-29 01:41:30 -0600

Ilya gravatar image

Could you please tell me how to build static libraries OpenCV with static libraries ffmpeg using cmake. The problem is that there is an application on the product server with older versions of OpenCV and ffmpeg, and my application uses newer versions. To avoid conflict, I would like to build my application with open source static libraries. An internet search unfortunately didn’t give anything. Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2020-04-29 07:03:17 -0600

supra56 gravatar image

Similar this. will work both 4.2.0 and 4.3.0:

-D BUILD_opencv_apps=OFF \
-D BUILD_opencv_python2=OFF \
-D BUILD_SHARED_LIBS=OFF \
-D WITH_FFMPEG=ON \
-D OPENCV_FFMPEG_SKIP_BUILD_CHECK=ON \
edit flag offensive delete link more

Comments

Yes, thank you! After cmake with yours parameters, make and make install in local home folder ~/opencv_local there are include (with h files) and lib(with a files) - it's exactly what I need. Finally, could you pleas tell me, how tutorial CMakeLists.txt(https://docs.opencv.or... should be changed for this case? Thank you.

Ilya gravatar imageIlya ( 2020-05-01 08:41:41 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-29 01:41:30 -0600

Seen: 2,120 times

Last updated: Apr 29 '20