Ask Your Question

Ask cmake to use ffmpeg library in /usr/local/lib

asked 2019-07-31 04:12:56 -0500

kiet gravatar image

My Ubuntu 18.04 has ffmpeg library in /usr/lib/x86_64-linux-gnu (,...). I have just rebuilt ffmpeg from sources and installed the library into /usr/local/lib. (,, ...). I also set LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH.

When building opencv, cmake always finds ffmpeg library in /usr/lib/x86_64-linux-gnu. How can I set default search path to /usr/local/lib ? Thanks !!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2019-08-05 09:24:05 -0500

mshabunin gravatar image

Set PKG_CONFIG_PATH environment variable to the location of your custom FFmpeg .pc files. Don't forget to do clean build or clean cmake cache.

edit flag offensive delete link more


Thank for your support !

kiet gravatar imagekiet ( 2019-08-05 21:11:47 -0500 )edit

Question Tools

1 follower


Asked: 2019-07-31 04:12:56 -0500

Seen: 712 times

Last updated: Aug 05 '19