Hi all,
I think there is a couple of problems with cmake and ffmpeg (and possibly with other modules), and I’m planning to provide a PR for it, however, I’d like to discuss some fundamental things and how kodi is designed to work with these dependencies, before creating it.
Let me start with this file: https://github.com/xbmc/xbmc/blob/master…eLists.txt
There a couple of assumptions regarding platform and cpu, however CPU is only passed on if this is a kodi depends build [1] so all of those assumptions are mostly useless.
Also, compiler flags defined in platform’s ArchSetup.cmake are not sent to ffmpeg (nor to other modules if I recall correctly) unless we are in a cross compile environment.
Android’s ArchSetup.cmake, here, tries to setup a couple of switches for ffmpeg which are not used anywhere nor passed on to ffmpeg.
So I was wondering what would be the correct way to do this, and setting these switches and compiler flags correctly for other modules.
One way to make this is to have more information in CMakeLists.txt from ffmpeg about the platform, CPU, compiler flags, and so on, and decide there, per platform, which switches to enable or disable.
Another way would be to continue the work that was started with Android and define everything at the ArchSetup level and then add it to the ffmpeg cmake project.
Before working on a patch, I’d like to understand your views and how this is supposed to be handled, and with that in mind I can produce a better and more consistent patch.
Hope to hear from you soon.
[1] I’m still struggling to understand what this means