Ask Your Question
0

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

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

kiet gravatar image

My Ubuntu 18.04 has ffmpeg library in /usr/lib/x86_64-linux-gnu (libavcodec.so.57 libavformat.so.57,...). I have just rebuilt ffmpeg from sources and installed the library into /usr/local/lib. (libavcodec.so.58, libavformat.so.58, ...). 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
0

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

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

Comments

Thank for your support !

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

Question Tools

1 follower

Stats

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

Seen: 1,458 times

Last updated: Aug 05 '19