Bugfix for libheif detection#5051
Closed
irieger wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Closed
Bugfix for libheif detection#5051irieger wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
irieger wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
When the LIBHEIF_LIBRARIES refers to targets (like happening when conan packaging provides the targets), an empty string from get_filename_component will fail as it is not counted as an argument if used without quotes.
|
Collaborator
|
Superseded by #5053 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When the LIBHEIF_LIBRARIES refers to targets (like happening when conan packaging provides the targets), an empty string from get_filename_component will fail as it is not counted as an argument if used without quotes.
Adding the quote lets the code pass without an error. It will not display the warning, but it provides at least a fix for letting it build. (In the conan package we patch that check out at the moment to get it to build: https://github.com/conan-io/conan-center-index/blob/master/recipes/openimageio/all/patches/3.1.10.0-conan-fixes.patch)
I tried to extract the underlying information but haven't come that far. For example some debugging code I tried:
Such commands extract a bit more info, as the library type is only INTERFACE_LIBRARY and not shared or static, that didn't help much. Also at least for usages like conan, where there are prepared helper tools to get all license information etc. So I'm not too deep into CMake for that specific stuff, so just at least suggesting to use the quotes to not break it if CMake can't extract the library file ending. Could also switch to display another warning saying it MIGHT link to libheif with its broken license.
Tests
The target to have it build with conan is achieved. Tried different experiments, including the current one locally via changing the patch accordingly.
Checklist:
behavior.
testsuite.
PR, by pushing the changes to my fork and seeing that the automated CI
passed there. (Exceptions: If most tests pass and you can't figure out why
the remaining ones fail, it's ok to submit the PR and ask for help. Or if
any failures seem entirely unrelated to your change; sometimes things break
on the GitHub runners.)
fixed any problems reported by the clang-format CI test.
corresponding Python bindings. If altering ImageBufAlgo functions, I also
exposed the new functionality as oiiotool options.