In line 485 of libraries/CMakeLists.txt, the variable FFMPEG_LIBRARY_DIR is set to be a path with trailing slash in UNIX AND NOT APPLE host platform.
However, in lines 492-499, the variable was used to construct path with those which have leading slash, leading to a malformed path with double slash issue.
set(LIBAVCODEC_PATH "${FFMPEG_LIBRARY_DIR}/libavcodec${FFMPEG_LIBRARY_SUFFIX}")
set(LIBAVDEVICE_PATH "${FFMPEG_LIBRARY_DIR}/libavdevice${FFMPEG_LIBRARY_SUFFIX}")
...
I think the definition of FFMPEG_LIBRARY_DIR should remove the trailing slash to prevent constructing such unnormalized paths.