Skip to content
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

Fixes to make Alembic exported config work for OpenEXR 2.x or Imath 3.x #355

Merged
merged 1 commit into from Jul 21, 2021

Conversation

lgritz
Copy link
Contributor

@lgritz lgritz commented Jul 21, 2021

I believe the way it currently was, the exported AlembicConfig.cmake
was fine for if Imath3 is being used, but for building against older
OpenEXR 2.x, would not work properly.

The change: AlembicIlmBase.cmake sets a variable that reveals whether
Imath3 was found or if we fall back to useing OpenEXR 2.x. Then we use
that to alter what the exported Alembic.config.cmake ought to say in
terms of whether to find_dependency(Imath) or find_dependency(IlmBase).

This extra smidge of complexity can be removed when Imath 3.x is the
true minimum. But given that OpenEXR 2.4 is (unwisely, IMHO) the
choice for VFX Platform 2021 and in the current set of DCC versions, I
believe we need to support OpenEXR 2.4 as a first class citizen for
just a little bit longer.

Signed-off-by: Larry Gritz lg@larrygritz.com

I believe the way it currently was, the exported AlembicConfig.cmake
was fine for if Imath3 is being used, but for building against older
OpenEXR 2.x, would not work properly.

The change: AlembicIlmBase.cmake sets a variable that reveals whether
Imath3 was found or if we fall back to useing OpenEXR 2.x. Then we use
that to alter what the exported Alembic.config.cmake ought to say in
terms of whether to find_dependency(Imath) or find_dependency(IlmBase).

This extra smidge of complexity can be removed when Imath 3.x is the
true minimum. But given that OpenEXR 2.4 is (unwisely, IMHO) the
choice for VFX Platform 2021 and in the current set of DCC versions, I
believe we need to support OpenEXR 2.4 as a first class citizen for
just a little bit longer.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz
Copy link
Contributor Author

lgritz commented Jul 21, 2021

Aside: I have learned (the hard way) that it's very easy for a project to screw up its generated cmake exported configs and not know it, because it's not actually tested by the project's own CI. What I've found helpful in my other projects is to make sure there is one test as part of the CI somehow that does an install, and then tries to build something trivial against the installed project -- essentially, a test that consumes the project the way a downstream user would, using the exported CMake configs, and 100% independent of the package's own build system.

@lamiller0 lamiller0 merged commit 6bd2242 into alembic:master Jul 21, 2021
@lgritz lgritz deleted the lg-exr2 branch July 21, 2021 17:52
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.

None yet

3 participants