Describe the bug
Since https://github.com/robotology/yarp/pull/2519, if we compile YARP master branch in icub-main CI, the ffmpeg dependency is automatically enabled, even if not all the libraries are found:
~~~
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FFMPEG_LIBAVDEVICE_LIBRARIES
linked by target "YARP_sig" in directory /home/runner/work/icub-main/icub-main/yarp/src/libYARP_sig/src
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Error: Process completed with exit code 1.
~~~
To Reproduce
See https://github.com/robotology/icub-main/blob/0360d1f0a1aaf348bc602174c8ace3fb2796952e/.github/workflows/ci.yml .
Expected behavior
YARP configures fine.
Configuration (please complete the following information):
I'm currently investigating this.
Apparently, the libopencv-dev package installs also a few libraries from ffmpeg, and the FindFFMPEG.cmake module sets FFMPEG_FOUND=TRUE even if the libavdevice-dev library is not found.
The FindFFMPEG.cmake module comes from YCM which downloads it from VTK
I'm testing the latest version of the FindFFMPEG.cmake, that would fix this particular issue, but, on the other side, it does not find FFMPEG when it is installed. I believe that is caused by the introduction of COMPONENTS, but i need some more time for testing.
Most helpful comment
I'm currently investigating this.
Apparently, the
libopencv-devpackage installs also a few libraries from ffmpeg, and theFindFFMPEG.cmakemodule sets FFMPEG_FOUND=TRUE even if thelibavdevice-devlibrary is not found.The
FindFFMPEG.cmakemodule comes from YCM which downloads it from VTKI'm testing the latest version of the
FindFFMPEG.cmake, that would fix this particular issue, but, on the other side, it does not find FFMPEG when it is installed. I believe that is caused by the introduction ofCOMPONENTS, but i need some more time for testing.