Ask cmake to use ffmpeg library in /usr/local/lib
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 !!