ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
406 stars 191 forks source link

Fix downstream cmake build #561

Open weatherhead99 opened 4 months ago

weatherhead99 commented 4 months ago

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 commented 4 months ago

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

hmaarrfk commented 4 months ago

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 commented 4 months ago

I unfortunately think the failure is real given that I restarted the builds fresh in: https://github.com/ukoethe/vigra/pull/559

and they are passing.

weatherhead99 commented 4 months ago

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 https://github.com/ukoethe/vigra/pull/559

and they are passing.

— Reply to this email directly, view it on GitHub https://github.com/ukoethe/vigra/pull/561#issuecomment-2022626496, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIKUMVJQP73EKL5B6CZY3DY2K2C3AVCNFSM6AAAAABFDTWHXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRSGYZDMNBZGY . You are receiving this because you authored the thread.Message ID: @.***>