[ffmpeg] no longer hardcode version strings in FindFFMPEG script#17236
[ffmpeg] no longer hardcode version strings in FindFFMPEG script#17236strega-nil merged 9 commits intomicrosoft:masterfrom
Conversation
|
Thanks this is a proper solution. |
|
Great, many thanks for giving it a look and for the quick response! |
ports/ffmpeg/portfile.cmake
Outdated
| extract_version_from_component(COMPONENT libavutil) | ||
| extract_version_from_component(COMPONENT libavcodec) | ||
| extract_version_from_component(COMPONENT libavdevice) | ||
| extract_version_from_component(COMPONENT libavfilter) | ||
| extract_version_from_component(COMPONENT libavformat) | ||
| extract_version_from_component(COMPONENT libavresample) | ||
| extract_version_from_component(COMPONENT libswresample) | ||
| extract_version_from_component(COMPONENT libswscale) |
There was a problem hiding this comment.
Just to be consistent with other functions in vcpkg I would make the output variable explicit.
extract_version_from_component(OUT_VARIABLE LIBAVUTIL_VERSION COMPONENT libavutil)
However the current design is convenient and since this is a one of for this port I'm not against merging as is.
Pinging @strega-nil for review of CMake guidelines.
There was a problem hiding this comment.
Yes, I completely agree it is best practice to make the output variable explicit. I guess the function could be made more generic to work for other ports too, but for the moment I'll update it as per your suggestion. Let me add a commit to this effect.
There was a problem hiding this comment.
I've made the suggested changes in 754423c
strega-nil
left a comment
There was a problem hiding this comment.
I really like this, but I've made changes to the cmake functions to be closer to how we want them to be written in the scripts tree (not necessary, but I thought it'd be good anyways)
|
|
Thanks @strega-nil LGTM! I'll see if I can reproduce that regression failure. |
|
I've fixed a few small typos, it passes locally for me, should be hopefully good to go now. |
|
depends on #17277 |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Describe the pull request
What does your PR fix? The version of ffmpeg and the versions of its components are currently hardcoded in the FindFFMPEG script. This patch instead extracts the versions from the source files, ensuring that they do not need to be updated by hand, and also ensuring that
--headbuilds have the correct version. I've manually verified that versions in the installed FindFFMPEG script are identical before and after patch.Which triplets are supported/not supported? Have you updated the CI baseline? No changes.
Does your PR follow the maintainer guide? Yes, to the best of my knowledge.
cc @genevanmeter (see #16882 (comment))