Ask Your Question

CMake static link ffmpeg for build shared libraries

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

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

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

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 \
edit flag offensive delete link more


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 -0500 )edit

Question Tools

1 follower


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

Seen: 808 times

Last updated: Apr 29 '20