Skip to content

Conversation

@weatherhead99
Copy link

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).

@hmaarrfk
Copy link
Collaborator

Do you know why the CIs are failing? is it actually due to a change you made?

@hmaarrfk
Copy link
Collaborator

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).

Thank you very much for this CMake is quite difficult to always stay up to date with!

@hmaarrfk
Copy link
Collaborator

I unfortunately think the failure is real given that I restarted the builds fresh in:
#559

and they are passing.

@weatherhead99
Copy link
Author

weatherhead99 commented Mar 27, 2024 via email

# 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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find_dependency(OpenEXR QUIET)
find_dependency(OpenEXR CONFIG QUIET)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants