-
Notifications
You must be signed in to change notification settings - Fork 196
Fix downstream cmake build #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix downstream cmake build #561
Conversation
|
Do you know why the CIs are failing? is it actually due to a change you made? |
Thank you very much for this CMake is quite difficult to always stay up to date with! |
|
I unfortunately think the failure is real given that I restarted the builds fresh in: and they are passing. |
|
I agree, just need to investigate where abouts in the buildsystem it's no
longer linking openEXR, or why not, will try to do in the next couple of
days
…On Wed, Mar 27, 2024 at 12:16 PM Mark Harfouche ***@***.***> wrote:
I unfortunately think the failure is real given that I restarted the
builds fresh in:
#559 <#559>
and they are passing.
—
Reply to this email directly, view it on GitHub
<#561 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIKUMVJQP73EKL5B6CZY3DY2K2C3AVCNFSM6AAAAABFDTWHXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRSGYZDMNBZGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
| # need to make sure we can resolve the target names | ||
| # that end up in VigraConfig.cmake | ||
| # If we found OpenEXR by targets. | ||
| find_dependency(OpenEXR QUIET) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| find_dependency(OpenEXR QUIET) | |
| find_dependency(OpenEXR CONFIG QUIET) |
This patch addresses something of an edge case but which crops up in modern linux distros:
In the case where downstream packages consume Vigra via CMake configuration files, AND you built it with openEXR AND that openEXR installation provided cmake configuration files, the vigraTargets.cmake file that is generated contains openEXR target names rather than absolute library paths.
In this case, we need to find openEXR in the config file transitively, otherwise downstream builds will fail because those targets don't exist.
For good measure, while we're there, in this case also modernise how we link in the targets (i.e. fully via target_link_libraries rather than manual include directories variables etc).