diff options
author | fuzzard <fuzzard@kodi.tv> | 2022-05-02 10:04:48 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2022-05-02 10:04:48 +1000 |
commit | 2e505d5cd9b0ce027854e94c184a320c43b4902d (patch) | |
tree | 60035cedf29778029db4369f5e521ab27bae9f71 /cmake | |
parent | d8fa54f1bdb0c494a71ed55e64824754b37925a5 (diff) |
[cmake] FFMPEG fix cmake multiple generation failure after #21047
Essentially, when cmake creates its list from PC_FFMPEG_STATIC_LDFLAGS and it contains
something like -framework OpenGL, on second+ runs of cmake regeneration, this list will be
passed through to set_target_properties for INTERFACE_LINK_LIBRARIES. This then will convert
the list (eg. -framework;OpenGL;) to (-framework;-lOpenGL). I believe this is due to
it expecting to have every entry with a - specifier (eg -l/-L-W, etc), and in the case
of the framework, as its not parsed as "-framework OpenGL" and instead splits it, we end
up with the bad list causing build failures for apple platforms.
Prior to #21047, the foreach loop for static libary search was not actually executed
because FFMPEG_LIBRARIES was empty, as it was set AFTER the foreach loop. in #21047 i
"fixed" this, by putting the set FFMPEG_LIBRARIES before the foreach, at which point the
loop actually did something now causing the list failure described above.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindFFMPEG.cmake | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake index ffc64d7d84..5ce39c9c62 100644 --- a/cmake/modules/FindFFMPEG.cmake +++ b/cmake/modules/FindFFMPEG.cmake @@ -273,7 +273,6 @@ else() set(FFMPEG_LIB_TYPE SHARED) foreach(_fflib IN LISTS FFMPEG_LIBRARIES) if(${_fflib} MATCHES ".+\.a$" AND PC_FFMPEG_STATIC_LDFLAGS) - set(FFMPEG_LDFLAGS ${PC_FFMPEG_STATIC_LDFLAGS} CACHE STRING "ffmpeg linker flags" FORCE) set(FFMPEG_LIB_TYPE STATIC) break() endif() |