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

Build against OpenEXR 3.0 + Imath 3.0 #2771

Merged
merged 1 commit into from Nov 16, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Nov 13, 2020

As OpenEXR works toward their 3.0 release, which includes splitting
Imath (the vector, matrix, math, and 'half' stuff) out into a separate
repo, their top of tree master finally breaks our "bleeding edge"
build.

This is a little tricky, because now our support of this dependency is
attempting to span 3 eras: 3.0 with the full split of openexr from
imath, recent openexr+ilmbase 2.x that supplies reliable exported
cmake configs, and older 2.x that predates cmake configs. Eventually
we'll phase out older versions and clean up.

Fixes in this patch generally include:

  • Add a new CI test of VFX2021 + openexr/imath master. (This will go away
    when 3.0 is released and that's what we use for the main 2021 case.)

  • For new enough versions of OpenEXR, use the exported config file and
    targets, rather than the old style OPENEXR_LIBRARIES style variables.
    We have kind of a mixed idiom use because we're still supporting older
    versions that predate use of the config files.

  • Deal with the fact that the Imath headers now live inside
    <Imath/ImathBlah.h> rather than <OpenEXR/ImathBlah.h>. But of
    course, you need to start including things just to find out the
    version. It's tricky. The logic is to look at
    <OpenEXR/OpenEXRConfig.h> to determine the version we're dealing
    with, then include Imath stuff from one or the other depending on
    what we found. I rearranged quite a few includes to ensure that all
    this logic only happens in a couple spots and the rest gets included
    transitively. As it turns out, quite a few of our #includes of
    Imath headers were redundant.

  • OpenImageIO-C depended on OpenImageIO publicly, but actually it
    should depend on OpenImageIO privately, but export its include
    needs.

  • OIIO's exported config needs to look for OpenEXR.

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

@lgritz lgritz force-pushed the lg-exr3 branch 8 times, most recently from 3b25d4c to aae4ec3 Compare November 15, 2020 20:27
As OpenEXR works toward their 3.0 release, which includes splitting
Imath (the vector, matrix, math, and 'half' stuff) out into a separate
repo, their top of tree master finally breaks our "bleeding edge"
build.

This is a little tricky, because now our support of this dependency is
attempting to span 3 eras: 3.0 with the full split of openexr from
imath, recent openexr+ilmbase 2.x that supplies reliable exported
cmake configs, and older 2.x that predates cmake configs. Eventually
we'll phase out older versions and clean up.

Fixes in this patch generally include:

* Add a new CI test of VFX2021 + openexr/imath master. (This will go away
  when 3.0 is released and that's what we use for the main 2021 case.)

* For new enough versions of OpenEXR, use the exported config file and
  targets, rather than the old style OPENEXR_LIBRARIES style variables.
  We have kind of a mixed idiom use because we're still supporting older
  versions that predate use of the config files.

* Move imath includes to new OpenImageIO/Imath.h Deal with the fact
  that the Imath headers now live inside `<Imath/ImathBlah.h>` rather
  than `<OpenEXR/ImathBlah.h>`. But of course, you need to start
  including things just to find out the version. It's tricky.  The
  logic is to look at `<OpenEXR/OpenEXRConfig.h>` to determine the
  version we're dealing with, then include Imath stuff from one or the
  other depending on what we found. I rearranged quite a few includes
  to ensure that all this logic only happens in a couple spots and the
  rest gets included transitively. As it turns out, quite a few of our
  `#include`s of Imath headers were redundant.

* OpenImageIO-C depended on OpenImageIO publicly, but actually it
  should depend on OpenImageIO privately, but export its include
  needs.

* OIIO's exported config needs to look for OpenEXR.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz merged commit 6313484 into AcademySoftwareFoundation:master Nov 16, 2020
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Nov 16, 2020
As OpenEXR works toward their 3.0 release, which includes splitting
Imath (the vector, matrix, math, and 'half' stuff) out into a separate
repo, their top of tree master finally breaks our "bleeding edge"
build.

This is a little tricky, because now our support of this dependency is
attempting to span 3 eras: 3.0 with the full split of openexr from
imath, recent openexr+ilmbase 2.x that supplies reliable exported
cmake configs, and older 2.x that predates cmake configs. Eventually
we'll phase out older versions and clean up.

Fixes in this patch generally include:

* Add a new CI test of VFX2021 + openexr/imath master. (This will go away
  when 3.0 is released and that's what we use for the main 2021 case.)

* For new enough versions of OpenEXR, use the exported config file and
  targets, rather than the old style OPENEXR_LIBRARIES style variables.
  We have kind of a mixed idiom use because we're still supporting older
  versions that predate use of the config files.

* Move imath includes to new OpenImageIO/Imath.h Deal with the fact
  that the Imath headers now live inside `<Imath/ImathBlah.h>` rather
  than `<OpenEXR/ImathBlah.h>`. But of course, you need to start
  including things just to find out the version. It's tricky.  The
  logic is to look at `<OpenEXR/OpenEXRConfig.h>` to determine the
  version we're dealing with, then include Imath stuff from one or the
  other depending on what we found. I rearranged quite a few includes
  to ensure that all this logic only happens in a couple spots and the
  rest gets included transitively. As it turns out, quite a few of our
  `#include`s of Imath headers were redundant.

* OpenImageIO-C depended on OpenImageIO publicly, but actually it
  should depend on OpenImageIO privately, but export its include
  needs.

* OIIO's exported config needs to look for OpenEXR.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz deleted the lg-exr3 branch November 16, 2020 01:37
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

1 participant